Skip to content

Commit 736f96d

Browse files
songy23mx-psi
authored andcommitted
[connector, exporter/datadog] Enable compute_stats_by_span_kind and peer_tags_aggregation by default (open-telemetry#35969)
#### Description Flip configs `traces::compute_stats_by_span_kind`, `traces::peer_tags_aggregation` and `traces::peer_service_aggregation` to true by default --------- Co-authored-by: Pablo Baeyens <[email protected]>
1 parent 48cc95d commit 736f96d

File tree

8 files changed

+86
-10
lines changed

8 files changed

+86
-10
lines changed

.chloggen/dd-conn-peer-tags.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: datadogconnector
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: "Flip configs `traces::compute_stats_by_span_kind`, `traces::peer_tags_aggregation` and `traces::peer_service_aggregation` to true by default"
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [35969]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: "This enables Datadog APM stats on peer tags by default and is a backwards-compatible change. Read more on https://docs.datadoghq.com/tracing/guide/inferred-service-opt-in/."
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

.chloggen/dd-exp-peer-tags.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: datadogexporter
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: "Flip configs `traces::compute_stats_by_span_kind`, `traces::peer_tags_aggregation` and `traces::peer_service_aggregation` to true by default"
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [35969]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: "This enables Datadog APM stats on peer tags by default and is a backwards-compatible change. Read more on https://docs.datadoghq.com/tracing/guide/inferred-service-opt-in/."
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

connector/datadogconnector/factory.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ func createDefaultConfig() component.Config {
4545
return &Config{
4646
Traces: TracesConfig{
4747
TracesConfig: datadogconfig.TracesConfig{
48-
IgnoreResources: []string{},
48+
IgnoreResources: []string{},
49+
PeerServiceAggregation: true,
50+
PeerTagsAggregation: true,
51+
ComputeStatsBySpanKind: true,
4952
},
5053

5154
TraceBuffer: 1000,

connector/datadogconnector/factory_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ func TestCreateDefaultConfig(t *testing.T) {
2121
&Config{
2222
Traces: TracesConfig{
2323
TracesConfig: datadogconfig.TracesConfig{
24-
IgnoreResources: []string{},
24+
IgnoreResources: []string{},
25+
PeerServiceAggregation: true,
26+
PeerTagsAggregation: true,
27+
ComputeStatsBySpanKind: true,
2528
},
2629
TraceBuffer: 1000,
2730
BucketInterval: 10 * time.Second,

exporter/datadogexporter/integrationtest/integration_test_config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ processors:
2121
connectors:
2222
datadog/connector:
2323
traces:
24-
compute_stats_by_span_kind: true
25-
peer_tags_aggregation: true
2624
peer_tags: ["extra_peer_tag"]
2725

2826
exporters:

pkg/datadog/config/config.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,10 @@ func CreateDefaultConfig() component.Config {
340340
Endpoint: "https://trace.agent.datadoghq.com",
341341
},
342342
TracesConfig: TracesConfig{
343-
IgnoreResources: []string{},
343+
IgnoreResources: []string{},
344+
PeerServiceAggregation: true,
345+
PeerTagsAggregation: true,
346+
ComputeStatsBySpanKind: true,
344347
},
345348
},
346349

pkg/datadog/config/config_test.go

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,10 @@ func TestCreateDefaultConfig(t *testing.T) {
440440
Endpoint: "https://trace.agent.datadoghq.com",
441441
},
442442
TracesConfig: TracesConfig{
443-
IgnoreResources: []string{},
443+
IgnoreResources: []string{},
444+
PeerServiceAggregation: true,
445+
PeerTagsAggregation: true,
446+
ComputeStatsBySpanKind: true,
444447
},
445448
},
446449
Logs: LogsConfig{
@@ -510,7 +513,10 @@ func TestLoadConfig(t *testing.T) {
510513
Endpoint: "https://trace.agent.datadoghq.com",
511514
},
512515
TracesConfig: TracesConfig{
513-
IgnoreResources: []string{},
516+
IgnoreResources: []string{},
517+
PeerServiceAggregation: true,
518+
PeerTagsAggregation: true,
519+
ComputeStatsBySpanKind: true,
514520
},
515521
},
516522
Logs: LogsConfig{
@@ -571,6 +577,9 @@ func TestLoadConfig(t *testing.T) {
571577
},
572578
SpanNameAsResourceName: true,
573579
IgnoreResources: []string{},
580+
PeerServiceAggregation: true,
581+
PeerTagsAggregation: true,
582+
ComputeStatsBySpanKind: true,
574583
},
575584
TraceBuffer: 10,
576585
},
@@ -630,7 +639,10 @@ func TestLoadConfig(t *testing.T) {
630639
"old_name3": "new_name3",
631640
"old_name4": "new_name4",
632641
},
633-
IgnoreResources: []string{},
642+
IgnoreResources: []string{},
643+
PeerServiceAggregation: true,
644+
PeerTagsAggregation: true,
645+
ComputeStatsBySpanKind: true,
634646
},
635647
},
636648
Logs: LogsConfig{
@@ -684,7 +696,10 @@ func TestLoadConfig(t *testing.T) {
684696
Endpoint: "https://trace.agent.datadoghq.com",
685697
},
686698
TracesConfig: TracesConfig{
687-
IgnoreResources: []string{},
699+
IgnoreResources: []string{},
700+
ComputeStatsBySpanKind: true,
701+
PeerServiceAggregation: true,
702+
PeerTagsAggregation: true,
688703
},
689704
},
690705
Logs: LogsConfig{

pkg/datadog/config/config_warnings_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func TestPeerTags(t *testing.T) {
137137
{
138138
name: "traces::peer_service_aggregation and traces::peer_tags_aggregation unset",
139139
cfgMap: confmap.New(),
140-
expectedPeerTagsValue: false,
140+
expectedPeerTagsValue: true,
141141
},
142142
{
143143
name: "traces::peer_tags_aggregation set",

0 commit comments

Comments
 (0)