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

[exporter/datadog] Deprecate peer_service_aggregation in favor of peer_tags_aggregation #29089

Merged
merged 6 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .chloggen/dd-deprecate-peer-svc-aggr.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: deprecation

# 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: "Deprecate config `traces::peer_service_aggregation` in favor of `traces::peer_tags_aggregation`"

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

# (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:

# 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-peer-tag-aggr.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: "Add a new config `traces::peer_tags_aggregation` that enables aggregation of peer related tags in Datadog exporter"

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

# (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:

# 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: []
4 changes: 2 additions & 2 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ require (
github.com/ClickHouse/clickhouse-go/v2 v2.15.0 // indirect
github.com/DataDog/agent-payload/v5 v5.0.89 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel // indirect
github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel.0.20231109182235-3aca48c3ec89 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231109182235-3aca48c3ec89 // indirect
github.com/DataDog/datadog-agent/pkg/util/cgroups v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/util/log v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/util/pointer v0.49.0-rc.2 // indirect
Expand Down
8 changes: 4 additions & 4 deletions cmd/configschema/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/otelcontribcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ require (
github.com/ClickHouse/clickhouse-go/v2 v2.15.0 // indirect
github.com/DataDog/agent-payload/v5 v5.0.89 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel // indirect
github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel.0.20231109182235-3aca48c3ec89 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231109182235-3aca48c3ec89 // indirect
github.com/DataDog/datadog-agent/pkg/util/cgroups v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/util/log v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/util/pointer v0.49.0-rc.2 // indirect
Expand Down
8 changes: 4 additions & 4 deletions cmd/otelcontribcol/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions exporter/datadogexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,20 @@ type TracesConfig struct {
// For the best experience with `peer.service`, it is recommended to also enable `compute_stats_by_span_kind`.
// If enabling both causes the datadog exporter to consume too many resources, try disabling `compute_stats_by_span_kind` first.
// If the overhead remains high, it will be due to a high cardinality of `peer.service` values from the traces. You may need to check your instrumentation.
// Deprecated: Please use PeerTagsAggregation instead
PeerServiceAggregation bool `mapstructure:"peer_service_aggregation"`

// If set to true, enables aggregation of peer related tags (e.g., `peer.service`, `db.instance`, etc.) in the datadog exporter.
// If disabled, aggregated trace stats will not include these tags as dimensions on trace metrics.
// For the best experience with peer tags, Datadog also recommends enabling `compute_stats_by_span_kind`.
// If you are using an OTel tracer, it's best to have both enabled because client/producer spans with relevant peer tags
// may not be marked by the datadog exporter as top-level spans.
// If enabling both causes the datadog exporter to consume too many resources, try disabling `compute_stats_by_span_kind` first.
// A high cardinality of peer tags or APM resources can also contribute to higher CPU and memory consumption.
// You can check for the cardinality of these fields by making trace search queries in the Datadog UI.
// The default list of peer tags can be found in https://github.com/DataDog/datadog-agent/blob/main/pkg/trace/stats/concentrator.go.
PeerTagsAggregation bool `mapstructure:"peer_tags_aggregation"`

// TraceBuffer specifies the number of Datadog Agent TracerPayloads to buffer before dropping.
// The default value is 0, meaning the Datadog Agent TracerPayloads are unbuffered.
TraceBuffer int `mapstructure:"trace_buffer"`
Expand Down
25 changes: 20 additions & 5 deletions exporter/datadogexporter/examples/collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -325,25 +325,40 @@ exporters:
#
# span_name_as_resource_name: true

## @param compute_stats_by_span_kind - enables APM stats computation based on `span.kind`
## @param compute_stats_by_span_kind - enables APM stats computation based on `span.kind` - optional
## If set to true, enables an additional stats computation check on spans to see they have an eligible `span.kind` (server, consumer, client, producer).
## If enabled, a span with an eligible `span.kind` will have stats computed. If disabled, only top-level and measured spans will have stats computed.
## NOTE: For stats computed from OTel traces, only top-level spans are considered when this option is off.
#
# compute_stats_by_span_kind: true

## @param peer_service_aggregation - enables `peer.service` aggregation on trace stats in Datadog exporter
## @param peer_service_aggregation - enables `peer.service` aggregation on trace stats in Datadog exporter - optional
## If set to true, enables `peer.service` aggregation in the exporter. If disabled, aggregated trace stats will not include `peer.service` as a dimension.
## For the best experience with `peer.service`, it is recommended to also enable `compute_stats_by_span_kind`.
## If enabling both causes the datadog exporter to consume too many resources, try disabling `compute_stats_by_span_kind` first.
## If the overhead remains high, it will be due to a high cardinality of `peer.service` values from the traces. You may need to check your instrumentation.
## Deprecated: Please use peer_tags_aggregation instead
#
# peer_service_aggregation: true

## @param trace_buffer - specifies the number of Datadog Agent TracerPayloads to buffer before dropping.
## If unset, the default value is 0, meaning the Datadog Agent TracerPayloads are unbuffered.
## @param peer_tags_aggregation - enables aggregation of peer related tags in Datadog exporter - optional
## If set to true, enables aggregation of peer related tags (e.g., `peer.service`, `db.instance`, etc.) in Datadog exporter.
## If disabled, aggregated trace stats will not include these tags as dimensions on trace metrics.
## For the best experience with peer tags, Datadog also recommends enabling `compute_stats_by_span_kind`.
## If you are using an OTel tracer, it's best to have both enabled because client/producer spans with relevant peer tags
## may not be marked by Datadog exporter as top-level spans.
## If enabling both causes Datadog exporter to consume too many resources, try disabling `compute_stats_by_span_kind` first.
## A high cardinality of peer tags or APM resources can also contribute to higher CPU and memory consumption.
## You can check for the cardinality of these fields by making trace search queries in the Datadog UI.
## The default list of peer tags can be found in https://github.com/DataDog/datadog-agent/blob/main/pkg/trace/stats/concentrator.go.
#
# peer_tags_aggregation: false

## @param trace_buffer - specifies the number of outgoing trace payloads to buffer before dropping - optional
## If unset, the default value is 0, meaning the outgoing trace payloads are unbuffered.
## If you start seeing log messages like `Payload in channel full. Dropped 1 payload.` in the datadog exporter, consider
## setting a higher `trace_buffer` to avoid traces being dropped.
## setting a higher `trace_buffer` to avoid traces being dropped.
#
# trace_buffer: 10

## @param host_metadata - custom object - optional
Expand Down
4 changes: 2 additions & 2 deletions exporter/datadogexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.20

require (
github.com/DataDog/agent-payload/v5 v5.0.89
github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel
github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7
github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel.0.20231109182235-3aca48c3ec89
github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231109182235-3aca48c3ec89
github.com/DataDog/datadog-api-client-go/v2 v2.18.0
github.com/DataDog/gohai v0.0.0-20220718130825-1776f9beb9cc
github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.8.0
Expand Down
8 changes: 4 additions & 4 deletions exporter/datadogexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions exporter/datadogexporter/integrationtest/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datado
go 1.20

require (
github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel
github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel.0.20231109182235-3aca48c3ec89
github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.88.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.88.0
github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.88.0
Expand Down Expand Up @@ -32,7 +32,7 @@ require (
github.com/DataDog/agent-payload/v5 v5.0.89 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231109182235-3aca48c3ec89 // indirect
github.com/DataDog/datadog-agent/pkg/util/cgroups v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/util/log v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/util/pointer v0.49.0-rc.2 // indirect
Expand Down
8 changes: 4 additions & 4 deletions exporter/datadogexporter/integrationtest/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading