Skip to content

Commit 4896471

Browse files
committed
adding datadog integration
1 parent dcc206f commit 4896471

File tree

5 files changed

+446
-27
lines changed

5 files changed

+446
-27
lines changed

env.example

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,20 @@ OTEL_SERVICE_NAME=optimize-me
1313
OTEL_SERVICE_VERSION=0.1.0
1414

1515
# Exporter Configuration
16-
# Type of exporter: "console" (development), "otlp" (production), or "jaeger"
17-
# (default: "console")
16+
# Type of exporter: "console" (development), "otlp" (production), "datadog", or "jaeger"
17+
# (default: "console", or "datadog" if DD_API_KEY is set)
1818
OTEL_EXPORTER_TYPE=console
1919

2020
# OTLP Exporter Endpoint
2121
# Endpoint for OTLP exporter (used when OTEL_EXPORTER_TYPE is "otlp" or "jaeger")
2222
# Format: http://host:port (default: "http://localhost:4318")
2323
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
2424

25+
# OTLP Traces Exporter (for opentelemetry-instrument)
26+
# Used by opentelemetry-instrument command: "console" or "otlp"
27+
# (default: not set, uses OTEL_EXPORTER_TYPE)
28+
OTEL_TRACES_EXPORTER=console
29+
2530
# Sampling Rate
2631
# Sampling rate for traces (0.0 to 1.0)
2732
# 1.0 = 100% sampling (all traces), 0.1 = 10% sampling (default: 1.0)
@@ -31,3 +36,34 @@ OTEL_TRACES_SAMPLER_ARG=1.0
3136
# Logging level for OpenTelemetry (DEBUG, INFO, WARNING, ERROR)
3237
# (default: "INFO")
3338
OTEL_LOG_LEVEL=INFO
39+
40+
# Datadog Configuration (optional)
41+
# These are used when OTEL_EXPORTER_TYPE is "datadog" or when DD_API_KEY is set
42+
# Required for Datadog exporter and Docker Compose
43+
#
44+
# How to get your API key:
45+
# 1. Sign in to Datadog: https://app.datadoghq.com (or create a free account)
46+
# 2. Go to: Organization Settings → API Keys
47+
# Direct link: https://app.datadoghq.com/organization-settings/api-keys
48+
# 3. Click "New Key" or "Create Key"
49+
# 4. Give it a name and copy the key (you'll only see it once!)
50+
# 5. Set it here or export as: export DD_API_KEY=your-key
51+
DD_API_KEY=
52+
53+
# Datadog Site (default: "datadoghq.com")
54+
# Options: datadoghq.com, datadoghq.eu, us3.datadoghq.com, etc.
55+
DD_SITE=datadoghq.com
56+
57+
# Datadog Environment (default: "development")
58+
DD_ENV=development
59+
60+
# Datadog Service Name (optional, defaults to OTEL_SERVICE_NAME)
61+
DD_SERVICE=optimize-me
62+
63+
# Datadog Service Version (optional, defaults to OTEL_SERVICE_VERSION)
64+
DD_VERSION=0.1.0
65+
66+
# Datadog Agent URL (optional, for native Datadog protocol)
67+
# When using Docker Compose, this is automatically http://localhost:8126
68+
# When using OTLP (recommended), use http://localhost:4317
69+
DD_AGENT_URL=http://localhost:8126

0 commit comments

Comments
 (0)