Skip to content

Commit

Permalink
[connector, exporter/datadog] Enable compute_stats_by_span_kind and p…
Browse files Browse the repository at this point in the history
…eer_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]>
  • Loading branch information
2 people authored and sbylica-splunk committed Dec 17, 2024
1 parent 48cc95d commit 736f96d
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 10 deletions.
27 changes: 27 additions & 0 deletions .chloggen/dd-conn-peer-tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: datadogconnector

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Flip configs `traces::compute_stats_by_span_kind`, `traces::peer_tags_aggregation` and `traces::peer_service_aggregation` to true by default"

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [35969]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
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/."

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
27 changes: 27 additions & 0 deletions .chloggen/dd-exp-peer-tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: datadogexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Flip configs `traces::compute_stats_by_span_kind`, `traces::peer_tags_aggregation` and `traces::peer_service_aggregation` to true by default"

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [35969]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
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/."

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
5 changes: 4 additions & 1 deletion connector/datadogconnector/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ func createDefaultConfig() component.Config {
return &Config{
Traces: TracesConfig{
TracesConfig: datadogconfig.TracesConfig{
IgnoreResources: []string{},
IgnoreResources: []string{},
PeerServiceAggregation: true,
PeerTagsAggregation: true,
ComputeStatsBySpanKind: true,
},

TraceBuffer: 1000,
Expand Down
5 changes: 4 additions & 1 deletion connector/datadogconnector/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ func TestCreateDefaultConfig(t *testing.T) {
&Config{
Traces: TracesConfig{
TracesConfig: datadogconfig.TracesConfig{
IgnoreResources: []string{},
IgnoreResources: []string{},
PeerServiceAggregation: true,
PeerTagsAggregation: true,
ComputeStatsBySpanKind: true,
},
TraceBuffer: 1000,
BucketInterval: 10 * time.Second,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ processors:
connectors:
datadog/connector:
traces:
compute_stats_by_span_kind: true
peer_tags_aggregation: true
peer_tags: ["extra_peer_tag"]

exporters:
Expand Down
5 changes: 4 additions & 1 deletion pkg/datadog/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,10 @@ func CreateDefaultConfig() component.Config {
Endpoint: "https://trace.agent.datadoghq.com",
},
TracesConfig: TracesConfig{
IgnoreResources: []string{},
IgnoreResources: []string{},
PeerServiceAggregation: true,
PeerTagsAggregation: true,
ComputeStatsBySpanKind: true,
},
},

Expand Down
23 changes: 19 additions & 4 deletions pkg/datadog/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,10 @@ func TestCreateDefaultConfig(t *testing.T) {
Endpoint: "https://trace.agent.datadoghq.com",
},
TracesConfig: TracesConfig{
IgnoreResources: []string{},
IgnoreResources: []string{},
PeerServiceAggregation: true,
PeerTagsAggregation: true,
ComputeStatsBySpanKind: true,
},
},
Logs: LogsConfig{
Expand Down Expand Up @@ -510,7 +513,10 @@ func TestLoadConfig(t *testing.T) {
Endpoint: "https://trace.agent.datadoghq.com",
},
TracesConfig: TracesConfig{
IgnoreResources: []string{},
IgnoreResources: []string{},
PeerServiceAggregation: true,
PeerTagsAggregation: true,
ComputeStatsBySpanKind: true,
},
},
Logs: LogsConfig{
Expand Down Expand Up @@ -571,6 +577,9 @@ func TestLoadConfig(t *testing.T) {
},
SpanNameAsResourceName: true,
IgnoreResources: []string{},
PeerServiceAggregation: true,
PeerTagsAggregation: true,
ComputeStatsBySpanKind: true,
},
TraceBuffer: 10,
},
Expand Down Expand Up @@ -630,7 +639,10 @@ func TestLoadConfig(t *testing.T) {
"old_name3": "new_name3",
"old_name4": "new_name4",
},
IgnoreResources: []string{},
IgnoreResources: []string{},
PeerServiceAggregation: true,
PeerTagsAggregation: true,
ComputeStatsBySpanKind: true,
},
},
Logs: LogsConfig{
Expand Down Expand Up @@ -684,7 +696,10 @@ func TestLoadConfig(t *testing.T) {
Endpoint: "https://trace.agent.datadoghq.com",
},
TracesConfig: TracesConfig{
IgnoreResources: []string{},
IgnoreResources: []string{},
ComputeStatsBySpanKind: true,
PeerServiceAggregation: true,
PeerTagsAggregation: true,
},
},
Logs: LogsConfig{
Expand Down
2 changes: 1 addition & 1 deletion pkg/datadog/config/config_warnings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func TestPeerTags(t *testing.T) {
{
name: "traces::peer_service_aggregation and traces::peer_tags_aggregation unset",
cfgMap: confmap.New(),
expectedPeerTagsValue: false,
expectedPeerTagsValue: true,
},
{
name: "traces::peer_tags_aggregation set",
Expand Down

0 comments on commit 736f96d

Please sign in to comment.