Skip to content

Datadog

Publishes TenXSummary values to Datadog Micrometer.

Availability

This implementation is only available by default in the 10x Engine Cloud flavor to reduce the footprint of the edge/JIT-edge flavors.

Configuration

To configure the Datadog metrics output module, Edit these settings.

Below is the default configuration from: datadog/config.yaml (* Required Fields).

Edit Online

Edit config.yaml Locally

# 🔟❎ 'run' Datadog metric output configuration

# Configure Datadog metric counter outputs.
# To learn more see https://doc.log10x.com/run/output/metric/datadog/

# Set the 10x pipeline to 'run'
tenx: run

# =============================== Dependencies ================================

include: run/modules/output/metric/datadog

# ============================== Datadog Options ==============================

# Define multiple Datadog metric outputs below
datadog:

    # --------------------------- Connection Options --------------------------

    # 'apiKey' and 'applicationKey' set the Datadog API and app keys (required).
    #  To learn more see: https://docs.datadoghq.com/account_management/api-app-keys/
  - apiKey: $=TenXEnv.get("DD_API_KEY")         # (❗ EnvVar REQUIRED)

    applicationKey: $=TenXEnv.get("DD_APP_KEY") # (❗ EnvVar REQUIRED)

    # 'uri' sets the Datadog site address to which to connect.
    #  To learn more see: https://docs.datadoghq.com/getting_started/site/
    uri: https://us5.datadoghq.com # (or https://api.us3.datadoghq.com)

    # ---------------------------- Publish Options ----------------------------

    # 'descriptions' sets whether to send meter descriptions to Datadog
    #  Turn this off to minimize the amount of data sent on each write
    descriptions: false

    # 'step' sets the interval to send metrics to CloudWatch (e.g., '1m').
    #  To learn more see: https://micrometer.io/docs/concepts#rate-aggregation
    step: 5s

    # ---------------------------- Counter Options ----------------------------

    # 'nameField' sets the TenXSummary field whose value identifies the micrometer counter to increment. 
    #  The 'inputName' field returns the name of the aggregator that produced the target TenXSummary instance.
    #  To learn more see https://doc.log10x.com/run/aggregate
    nameField: inputName

    # 'counterFields' specifies the TenXSummary fields whose values are used to increment the counter.
    #  To learn more see https://doc.log10x.com/run/aggregate/#summary-fields
    counterFields:
      - summaryVolume
      - summaryBytes
      - summaryTotals

    # 'tagFields' sets the TenXSummary fields used as the counter tag dimension values.
    #  Defaults to https://doc.log10x.com/run/initialize/#enrichmentFields
    tagFields:
      - $=yield TenXEnv.get("enrichmentFields")

    # 'tagFieldNames' allows setting custom names to aggregated fields for metrics reporting.
    #  Defaults to https://doc.log10x.com/run/initialize/#metricFieldNames
    tagFieldNames:
      - $=yield TenXEnv.get("metricFieldNames")

    # 'filter' sets a JavaScript expression that TenXSummaries must evaluate as truthy to write to the output.
    #  To learn more see https://doc.log10x.com/run/output/regulate/#filter-expressions
    filter: isSummary

Options

Specify the options below to configure multiple Datadog metrics output:

Name Description Category
datadogEnabled Enable this output General
datadogNameField Name of the TenXSummary field identifying the metric Counter
datadogCounterFields Names of the TenXSummary fields used to increment the metric counter value Counter
datadogTagFields List of TenXSummary fields to use as metric tag values Counter
datadogTagFieldNames List of custom names to use for TenXSummary fields. Counter
datadogFilter A JavaScript expression an TenXSummary must evaluate as 'truthy' against to be written to this output Counter
datadogMaxCardinality Maximum number of unique metric combinations allowed Counter
datadogDescriptions Sets whether to send meter descriptions to Datadog scrape Counter
datadogStep The interval at which to publish metrics to output Counter
datadogApiKey Datadog apiKey Authentication
datadogApplicationKey Datadog application Key. Authentication
datadogHostTag Value to map to "host" when shipping metrics to Datadog Authentication
datadogUri The URI of an internal proxy en route to Datadog. Authentication

General

datadogEnabled

Enable this output.

Type Default Category
Boolean true General

Enable or disable this output.

Counter

datadogNameField

Name of the TenXSummary field identifying the metric.

Type Default Category
String summaryValues Counter

Defines the name of the TenXSummary field whose value identifies a metric counter. Defaults to the summaryValues field which holds the value(s) by which TenXObjects are grouped into the current TenXSummary instance. To learn more see micrometer counters.

datadogCounterFields

Names of the TenXSummary fields used to increment the metric counter value.

Type Default Category
List summaryVolume Counter

Defines the name of the TenXSummary field by whose value to increment the counter.

datadogTagFields

List of TenXSummary fields to use as metric tag values.

Type Default Category
List [] Counter

Defines the TenXSummary field names to use as tag values. Tags are dimensions that enable slicing a particular named metric to drill down to reason about its value. To learn more see micrometer tags.

datadogTagFieldNames

List of custom names to use for TenXSummary fields.

Type Default Category
List [] Counter

Defines the a list of custom names to give fields when reporting them. Format as a list of name1, custom1, name2, custom2.

For example, to set a custom name of 'My-Custom-Field' to an existing 'intrinsic-field':

datadog:
  tagFieldNames:
    - intrinsic-field
    - My-Custom-Field.

datadogFilter

A JavaScript expression an TenXSummary must evaluate as 'truthy' against to be written to this output.

Type Default Category
String "" Counter

Specifies a JavaScript expression that an TenXSummary must evaluate as truthy to write its instance/template field values to the target counter.

For example, to only emit TenXSummaries produced by the 'myMetric' aggregator, specify:

datadog:
  filter: this.inputName == "myMetric"

To learn more see inputName.

datadogMaxCardinality

Maximum number of unique metric combinations allowed.

Type Default Category
Number 500 Counter

Sets the maximum number of unique metric combinations (cardinality) allowed for this output. When exceeded, metrics will be dropped to prevent excessive cardinality.

datadogDescriptions

Sets whether to send meter descriptions to Datadog scrape.

Type Default Category
Boolean false Counter

Sets whether to send meter descriptions to Datadog Turn this off to minimize the amount of data sent on each write.

datadogStep

The interval at which to publish metrics to output.

Type Default Category
String 1 minute. Counter

Sets the interval at which to publish metrics to the time-series destination (e.g., '1m'). To learn more see rate-aggregation.

Authentication

datadogApiKey

Datadog apiKey.

Type Default Category
String "" Authentication

Sets the Datadog api key.

datadogApplicationKey

Datadog application Key.

Type Default Category
String "" Authentication

Sets the Datadog app Key.

datadogHostTag

Value to map to "host" when shipping metrics to Datadog.

Type Default Category
String "" Authentication

Value to map to "host" when shipping metrics to Datadog.

datadogUri

The URI of an internal proxy en route to Datadog.

Type Default Category
String https://api.datadoghq.com Authentication

Sets the Datadog site address to connect to (e.g. 'us5.datadoghq.com'). To learn more see Datadog sites.


This module is defined in datadog/module.yaml.