Datadog with Vector

📘

Service Maps is an Enterprise-only feature

If you already have Vector configured

Below is an example vector.toml configuration. You likely already have a datadog source and sink. Please make the following adjustments:

  1. Make sure multiple_outputs = true is set on your source
  2. Add the transforms.traces_for_codesee transform
  3. Add the sinks.codesee_traces sink
  4. Make sure you replace YOUR_IN_NAME with the actual name of your datadog agent source
  5. Make sure you replace CodeSee:2:3:xxxx with your CodeSee Ingestion Token
# You likely already have this source
[sources.YOUR_IN_NAME]
type = "datadog_agent"
address = "0.0.0.0:XXXX"   # change the XXXX to your Vector port
multiple_outputs = true    # Send data to Datadog and CodeSee

# You likely already have this sink
[sinks.datadog_traces]
type = "datadog_traces"
inputs = ["YOUR_IN_NAME.traces"]
default_api_key = "xxxx"   # change to your DD key
site = "us5.datadoghq.com" # change to your DD site


# Sets the CodeSee Ingestion Token for auth
[transforms.traces_for_codesee]
type = "remap"
inputs = ["YOUR_IN_NAME.traces"]
source = '''
  # change to CodeSee ingestion token
  set_secret("datadog_api_key", "CodeSee:2:3:xxxx")
'''

# Sends trace data to CodeSee
[sinks.codesee_traces]
healthcheck = false
type = "datadog_traces"
inputs = ["traces_for_codesee"]
default_api_key = "CodeSee:2:3:xxxx"
endpoint = "https://in-datadog.codesee.io"

If you don't have Vector configured

Follow the Vector docs to setup and configure Vector. In addition, make sure to add the following to your Datadog Agent config:

vector:
  traces.enabled: true
  traces.url: http://<vector-domain>:XXXX # change to your Vector location

Then follow the instructions above.