Datadog
If you want to use Datadog as the trace data store, you'll configure the OpenTelemetry Collector to receive traces from your system and then send them to both Tracetest and Datadog. And, you don't have to change your existing pipelines to do so.
Examples of configuring Tracetest with Datadog can be found in the examples
folder of the Tracetest GitHub repo.
Configuring OpenTelemetry Collector to Send Traces to Both Datadog and Tracetest​
In your OpenTelemetry Collector config file:
- Set the
exporter
tootlp/tracetest
- Set the
endpoint
to your Tracetest instance on port4317
If you are running Tracetest with Docker, and Tracetest's service name is tracetest
, then the endpoint might look like this http://tracetest:4317
Additionally, add another config:
- Set the
exporter
todatadog
. - Set the
api
pointing to your Datadog account. - Set the
site
to Datadog APIdatadoghq.com
. - Set the
key
to your Datadog API key.
# collector.config.yaml
# If you already have receivers declared, you can just ignore
# this one and still use yours instead.
receivers:
otlp:
protocols:
http:
grpc:
processors:
# This configuration is needed to guarantee that the data is sent correctly to Datadog
batch:
send_batch_max_size: 100
send_batch_size: 10
timeout: 10s
exporters:
# OTLP for Tracetest
# Send traces to Tracetest.
# Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector
otlp/tracetest:
endpoint: tracetest:4317
tls:
insecure: true
# Datadog exporter
# One example on how to set up a collector configuration for Datadog can be seen here:
# https://docs.datadoghq.com/opentelemetry/otel_collector_datadog_exporter/?tab=onahost
datadog:
api:
site: datadoghq.com
key: ${DATADOG_API_KEY} # Add here you API key for Datadog
service:
pipelines:
traces/tracetest:
receivers: [otlp]
processors: [batch]
exporters: [otlp/tracetest] # exporter sending traces to your Tracetest instance
traces/datadog:
receivers: [otlp]
processors: [batch]
exporters: [datadog] # exporter sending traces to directly to Datadog
Configure Tracetest to Use Datadog as a Trace Data Store​
Configure your Tracetest instance to expose an otlp
endpoint to make it aware it will receive traces from the OpenTelemetry Collector. This will expose Tracetest's trace receiver on port 4317
.
Connect Tracetest to Datadog with the Web UI​
In the Web UI, (1) open Settings, and, on the (2) Trace Ingestion tab, select (3) Datadog.
Connect Tracetest to Datadog with the CLI​
Or, if you prefer using the CLI, you can use this file config.
type: DataStore
spec:
name: Datadog pipeline
type: datadog
default: true
Proceed to run this command in the terminal and specify the file above.
tracetest apply datastore -f my/data-store/file/location.yaml