Skip to content

Commit

Permalink
exporter/datadog: disable APM stats via feature flag
Browse files Browse the repository at this point in the history
This change adds the "exporter.datadogexporter.disable_apm_stats"
feature flag, which can be enabled to disable APM stats computation.

Updates #28615
  • Loading branch information
gbbr committed Oct 31, 2023
1 parent b3328a7 commit 987f13c
Show file tree
Hide file tree
Showing 19 changed files with 189 additions and 84 deletions.
27 changes: 27 additions & 0 deletions .chloggen/gbbr_nostats.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: exporter/datadog

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Added the "exporter.datadogexporter.disable_apm_stats" feature gate to disable APM stats computation.

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

# (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: []
16 changes: 8 additions & 8 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ require (
github.com/ClickHouse/ch-go v0.58.2 // indirect
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.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/proto v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/cgroups v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/log v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/pointer v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/scrubber v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/proto 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/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
github.com/DataDog/datadog-agent/pkg/util/scrubber v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-api-client-go/v2 v2.18.0 // indirect
github.com/DataDog/datadog-go/v5 v5.1.1 // indirect
github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect
Expand Down
9 changes: 9 additions & 0 deletions cmd/configschema/go.sum

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

16 changes: 8 additions & 8 deletions cmd/otelcontribcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,14 @@ require (
github.com/ClickHouse/ch-go v0.58.2 // indirect
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.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/proto v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/cgroups v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/log v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/pointer v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/scrubber v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-agent/pkg/proto 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/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
github.com/DataDog/datadog-agent/pkg/util/scrubber v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-api-client-go/v2 v2.18.0 // indirect
github.com/DataDog/datadog-go/v5 v5.1.1 // indirect
github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect
Expand Down
9 changes: 9 additions & 0 deletions cmd/otelcontribcol/go.sum

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

16 changes: 8 additions & 8 deletions connector/datadogconnector/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/connector/datad
go 1.20

require (
github.com/DataDog/datadog-agent/pkg/proto v0.48.1
github.com/DataDog/datadog-agent/pkg/proto v0.49.0-rc.2
github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.8.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.88.0
github.com/stretchr/testify v1.8.4
Expand All @@ -15,13 +15,13 @@ require (
)

require (
github.com/DataDog/datadog-agent/pkg/obfuscate v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/cgroups v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/log v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/pointer v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/scrubber v0.48.1 // 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/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
github.com/DataDog/datadog-agent/pkg/util/scrubber v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-go/v5 v5.1.1 // indirect
github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect
github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.8.0 // indirect
Expand Down
9 changes: 9 additions & 0 deletions connector/datadogconnector/go.sum

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

7 changes: 7 additions & 0 deletions exporter/datadogexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ var mertricExportNativeClientFeatureGate = featuregate.GlobalRegistry().MustRegi
featuregate.WithRegisterDescription("When enabled, metric export in datadogexporter uses native Datadog client APIs instead of Zorkian APIs."),
)

// noAPMStatsFeatureGate causes the trace consumer to skip APM stats computation.
var noAPMStatsFeatureGate = featuregate.GlobalRegistry().MustRegister(
"exporter.datadogexporter.disable_apm_stats",
featuregate.StageAlpha,
featuregate.WithRegisterDescription("Datadog Exporter will not compute APM Stats"),
)

// isMetricExportV2Enabled returns true if metric export in datadogexporter uses native Datadog client APIs, false if it uses Zorkian APIs
func isMetricExportV2Enabled() bool {
return mertricExportNativeClientFeatureGate.IsEnabled()
Expand Down
18 changes: 9 additions & 9 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.48.1
github.com/DataDog/datadog-agent/pkg/trace v0.48.1
github.com/DataDog/datadog-agent/pkg/proto v0.49.0-rc.2
github.com/DataDog/datadog-agent/pkg/trace v0.50.0-devel.0.20231030140030-aa8a206e6ac7
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 Expand Up @@ -54,12 +54,12 @@ require (
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect
contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/cgroups v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/log v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/pointer v0.48.1 // indirect
github.com/DataDog/datadog-agent/pkg/util/scrubber v0.48.1 // 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/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
github.com/DataDog/datadog-agent/pkg/util/scrubber v0.49.0-rc.2 // indirect
github.com/DataDog/datadog-go/v5 v5.1.1 // indirect
github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect
github.com/DataDog/zstd v1.5.2 // indirect
Expand All @@ -72,7 +72,7 @@ require (
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect
github.com/containerd/cgroups v1.0.4 // indirect
github.com/containerd/cgroups/v3 v3.0.2 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
Expand Down
Loading

0 comments on commit 987f13c

Please sign in to comment.