Skip to main content

Integrate Datadog logs, APM, and custom metrics

Nullplatform supports Datadog as a logs and metrics provider. This page explains how to integrate Datadog with nullplatform to leverage its monitoring and observability features.

Grant nullplatform access to Datadog

You can enable Datadog for the following scope types:

  • Instance-based
  • Kubernetes-based

For instance-based scopes

Datadog for instance-based scopes is a supported provider.

To configure it, you'll need to access nullplatform:

  1. Log in to your organization's portal at https://<your-org-name>.app.nullplatform.io.
  2. Go to Platform settings > Metrics/Logging.
  3. Click + New configuration and select Datadog as the provider.
  4. Fill in the required configuration details.
  5. Click Create configuration to save your setup.
info

See the Supported integrations and Providers docs for more details on this configuration.

For Kubernetes-based scopes

To enable Datadog for your Kubernetes-based scopes:

  1. Create a Kubernetes secret named datadog-secret containing your Datadog API key. Use the following template:

    apiVersion: v1
    kind: Secret
    metadata:
    name: datadog-secret
    namespace: nullplatform-tools
    type: Opaque
    data:
    DATADOG_API_KEY: <your key>
  2. Go to the null-metrics file and update the env section of the nullplatform-log-controller container:

    env:
    - name: DATADOG_LOGS_ENABLED
    value: 'true'
    - name: DATADOG_PERFORMANCE_METRICS_ENABLED
    value: 'true'
    - name: DATADOG_API_KEY
    valueFrom:
    secretKeyRef:
    name: datadog-secret
    key: DATADOG_API_KEY

Enable logs and metrics when creating scopes

Once Datadog access is granted through providers, configure scopes to use Datadog for logs and metrics:

  1. Navigate to Development > Scopes and click + New scope.
  2. Fill in the required configuration details:
    • Select the environment and country.
    • Give the scope a descriptive name.
    • Select the target: either Server instances or Kubernetes, depending on your configuration.
    • Click Advanced > Logs/Metrics and select Datadog as provider.
    • Click Create scope to complete the task.

Create custom tags

In nullplatform, you can create parameters to send custom tags to Datadog. These parameters are defined as environment variables in the format NP_DD_<tag-name>. The tag value comes from the content of the environment variable.

For example, setting NP_DD_ENV=test will be relayed to Datadog as env:test.

To create custom tags:

  1. In nullplatform, go to Development > Parameters, and click + New parameter.
  2. Fill in the required details: .
    • Name: Use NP_DD_<tag-name>(e.g., NP_DD_ENV). The name of the variable will autocomplete as you type.
    • Type: Select Environment variable.
    • Scope: Choose the scope where the parameter should apply.
    • Value: Enter the desired tag value (e.g.,test).
  3. Click Create parameter to save your changes.

Your new custom tag will now be created as a parameter, and you’ll see it listed with the configuration details you added.

Send nullplatform metrics to Datadog

By enabling Datadog as the metric provider in your scope, nullplatform automatically sends special logs to your Datadog account, which can be transformed into detailed performance metrics.

When configuring metrics (e.g., memory, CPU, HTTP metrics), they will also be visible in the Performance section of your application in the nullplatform UI.

Available metrics for monitoring your system (grouped by category for easier navigation):

Memory metrics

nullplatform.scope.memory_usage_kb

nullplatform.scope.memory_usage_percentage

CPU metrics

nullplatform.scope.cpu_usage_percentage

HTTP metrics

nullplatform.scope.request_count

nullplatform.scope.response_time

note

See the Group By info in the Reference section at the bottom of this page.

Recommendation: set a proxy agent to deliver custom metrics and APM

To transmit custom metrics and APM data to Datadog we recommend you configure a Proxy Agent. This setup lets your application send data directly to the agent minimizing the number of host agents needed, streamlining your architecture.

Here is a diagram of the proposed architecture:

For optimal performance and reliability, we recommend using a Network Load Balancer (NLB) with at least two agents.


Metrics reference

Common Group By fields

The following fields are commonly used across multiple metrics:

Field nameDescription
@accountThe account name.
@account_idThe unique identifier for the account.
@namespaceThe namespace name.
@namespace_idThe unique identifier for the namespace.
@applicationThe application name.
@application_idThe unique identifier for the application.
@scopeThe scope name.
@scope_idThe unique identifier for the scope.
@deployment_idThe unique identifier for the deployment.
@instance_idThe unique identifier for the instance.

Additional Group by fields

The following fields are used for HTTP metrics:

Field nameDescription
@qualityThe quality of the request (HTTP metrics only).
@codeThe HTTP response code (HTTP metrics only).
@is_healthcheckIndicates if the request is a healthcheck (HTTP metrics only).