diff --git a/pkg/otlp/map_provider.go b/pkg/otlp/map_provider.go index 7198d32f02223..f9736094de348 100644 --- a/pkg/otlp/map_provider.go +++ b/pkg/otlp/map_provider.go @@ -26,7 +26,6 @@ func buildKey(keys ...string) string { // defaultTracesConfig is the base traces OTLP pipeline configuration. // This pipeline is extended through the datadog.yaml configuration values. // It is written in YAML because it is easier to read and write than a map. -// TODO (AP-1254): Set service-level configuration when available. const defaultTracesConfig string = ` receivers: otlp: @@ -37,6 +36,9 @@ exporters: insecure: true service: + telemetry: + metrics: + level: none pipelines: traces: receivers: [otlp] @@ -57,7 +59,6 @@ func buildTracesMap(tracePort uint) (*config.Map, error) { } // defaultMetricsConfig is the metrics OTLP pipeline configuration. -// TODO (AP-1254): Set service-level configuration when available. const defaultMetricsConfig string = ` receivers: otlp: @@ -70,6 +71,9 @@ exporters: serializer: service: + telemetry: + metrics: + level: none pipelines: metrics: receivers: [otlp] diff --git a/pkg/otlp/map_provider_test.go b/pkg/otlp/map_provider_test.go index 8c60fe6e52816..8a8a61b564e72 100644 --- a/pkg/otlp/map_provider_test.go +++ b/pkg/otlp/map_provider_test.go @@ -52,6 +52,7 @@ func TestNewMap(t *testing.T) { }, }, "service": map[string]interface{}{ + "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ "receivers": []interface{}{"otlp"}, @@ -117,6 +118,7 @@ func TestNewMap(t *testing.T) { }, }, "service": map[string]interface{}{ + "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ "receivers": []interface{}{"otlp"}, @@ -160,6 +162,7 @@ func TestNewMap(t *testing.T) { }, }, "service": map[string]interface{}{ + "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "traces": map[string]interface{}{ "receivers": []interface{}{"otlp"}, @@ -218,6 +221,7 @@ func TestNewMap(t *testing.T) { }, }, "service": map[string]interface{}{ + "telemetry": map[string]interface{}{"metrics": map[string]interface{}{"level": "none"}}, "pipelines": map[string]interface{}{ "metrics": map[string]interface{}{ "receivers": []interface{}{"otlp"},