Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pkg/otlp] Disable OTLP internal metrics port #10660

Merged
merged 1 commit into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions pkg/otlp/map_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -37,6 +36,9 @@ exporters:
insecure: true

service:
telemetry:
metrics:
level: none
pipelines:
traces:
receivers: [otlp]
Expand All @@ -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:
Expand All @@ -70,6 +71,9 @@ exporters:
serializer:

service:
telemetry:
metrics:
level: none
pipelines:
metrics:
receivers: [otlp]
Expand Down
4 changes: 4 additions & 0 deletions pkg/otlp/map_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down Expand Up @@ -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"},
Expand Down Expand Up @@ -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"},
Expand Down Expand Up @@ -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"},
Expand Down