From 1a69194e7c958641288a3f0489372acb2cecfa34 Mon Sep 17 00:00:00 2001 From: mackjmr Date: Fri, 13 Dec 2024 15:46:34 +0100 Subject: [PATCH] update example ports to 0.0.0.0 (defaults to localhost) and add annotations example with remove note --- ...dog-agent-with-otel-agent-annotations.yaml | 89 +++++++++++++++++++ ...tadog-agent-with-otel-agent-configmap.yaml | 4 +- .../datadog-agent-with-otel-agent.yaml | 4 +- 3 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 examples/datadogagent/datadog-agent-with-otel-agent-annotations.yaml diff --git a/examples/datadogagent/datadog-agent-with-otel-agent-annotations.yaml b/examples/datadogagent/datadog-agent-with-otel-agent-annotations.yaml new file mode 100644 index 000000000..e4970e7d4 --- /dev/null +++ b/examples/datadogagent/datadog-agent-with-otel-agent-annotations.yaml @@ -0,0 +1,89 @@ +apiVersion: datadoghq.com/v2alpha1 +kind: DatadogAgent +metadata: + annotations: + # Note: annotations support is temporary and will be removed in the future. + # Please use otelCollector Feature instead. + agent.datadoghq.com/otel-agent-enabled: "true" + name: datadog +spec: + global: + credentials: + apiKey: + override: + nodeAgent: + customConfigurations: + otel-config.yaml: + configMap: + name: my-datadog-otel-config + items: + - key: otel-config.yaml + path: otel-config.yaml +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: my-datadog-otel-config + labels: + app.kubernetes.io/name: "my-datadog" + app.kubernetes.io/version: "7" +data: + otel-config.yaml: |- + receivers: + prometheus: + config: + scrape_configs: + - job_name: "otel-agent" + scrape_interval: 10s + static_configs: + - targets: ["0.0.0.0:8888"] + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 + exporters: + debug: + verbosity: detailed + datadog: + api: + key: ${env:DD_API_KEY} + processors: + infraattributes: + cardinality: 2 + probabilistic_sampler: + hash_seed: 22 + sampling_percentage: 15.3 + batch: + timeout: 10s + connectors: + datadog/connector: + traces: + compute_top_level_by_span_kind: true + peer_tags_aggregation: true + compute_stats_by_span_kind: true + extensions: + health_check: + service: + extensions: [health_check] + telemetry: + logs: + level: debug + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [datadog/connector] + traces/sampled: + receivers: [otlp] + processors: [probabilistic_sampler, infraattributes, batch] + exporters: [datadog] + metrics: + receivers: [otlp, datadog/connector, prometheus] + processors: [infraattributes, batch] + exporters: [datadog] + logs: + receivers: [otlp] + processors: [infraattributes, batch] + exporters: [datadog] \ No newline at end of file diff --git a/examples/datadogagent/datadog-agent-with-otel-agent-configmap.yaml b/examples/datadogagent/datadog-agent-with-otel-agent-configmap.yaml index a71737720..9ac53828d 100644 --- a/examples/datadogagent/datadog-agent-with-otel-agent-configmap.yaml +++ b/examples/datadogagent/datadog-agent-with-otel-agent-configmap.yaml @@ -30,13 +30,15 @@ data: otlp: protocols: grpc: + endpoint: 0.0.0.0:4317 http: + endpoint: 0.0.0.0:4318 exporters: debug: verbosity: detailed datadog: api: - key: + key: ${env:DD_API_KEY} processors: batch: connectors: diff --git a/examples/datadogagent/datadog-agent-with-otel-agent.yaml b/examples/datadogagent/datadog-agent-with-otel-agent.yaml index 9a3c62e55..6f4236e35 100644 --- a/examples/datadogagent/datadog-agent-with-otel-agent.yaml +++ b/examples/datadogagent/datadog-agent-with-otel-agent.yaml @@ -20,13 +20,15 @@ spec: otlp: protocols: grpc: + endpoint: 0.0.0.0:4317 http: + endpoint: 0.0.0.0:4318 exporters: debug: verbosity: detailed datadog: api: - key: "" + key: ${env:DD_API_KEY} processors: batch: connectors: