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

[connector/datadog] Use the native OTel ingest API in APM stats #33297

Merged
merged 10 commits into from
Jun 26, 2024

Conversation

songy23
Copy link
Member

@songy23 songy23 commented May 29, 2024

Description:
Add a feature gate connector.datadogconnector.NativeIngest that enables datadog connector to use the new native OTel API in APM stats computation. It is disabled by default.

Follow-up of DataDog/datadog-agent#23503.

@github-actions github-actions bot added cmd/configschema configschema command cmd/otelcontribcol otelcontribcol command connector/datadog exporter/datadog Datadog components labels May 29, 2024
@songy23 songy23 marked this pull request as ready for review May 30, 2024 15:13
@songy23 songy23 requested a review from a team as a code owner May 30, 2024 15:13
go.mod Outdated
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.54.0-rc.5 // indirect
github.com/DataDog/datadog-agent/pkg/status/health v0.54.0-rc.5 // indirect
github.com/DataDog/datadog-agent/pkg/telemetry v0.54.0-rc.5 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.54.0-rc.5 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.55.0-devel.0.20240529144302-ebeee88c4ff5 // indirect
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a commit version for now, probably need to wait for the official release before merging this PR.

Copy link
Member

@mx-psi mx-psi Jun 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking merge based on this comment (#33297 (comment))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now unblocked with #33726

Copy link
Member

@dineshg13 dineshg13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall have few nit comments

connector/datadogconnector/connector_native.go Outdated Show resolved Hide resolved
func newTraceToMetricConnectorNative(set component.TelemetrySettings, cfg component.Config, metricsConsumer consumer.Metrics, metricsClient statsd.ClientInterface) (*traceToMetricConnectorNative, error) {
set.Logger.Info("Building datadog connector for traces to metrics")
in := make(chan *pb.StatsPayload, 100)
set.MeterProvider = noop.NewMeterProvider() // disable metrics for the connector
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we doing it ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the code stands, if we enable this, we may have duplicate metrics from the connector and exporter with the exact same name and tags. We can add support for this, but we need to fix that first.

go.mod Outdated
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.54.0-rc.5 // indirect
github.com/DataDog/datadog-agent/pkg/status/health v0.54.0-rc.5 // indirect
github.com/DataDog/datadog-agent/pkg/telemetry v0.54.0-rc.5 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.54.0-rc.5 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.55.0-devel.0.20240529144302-ebeee88c4ff5 // indirect
Copy link
Member

@mx-psi mx-psi Jun 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking merge based on this comment (#33297 (comment))

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jun 18, 2024
@songy23 songy23 added never stale Issues marked with this label will be never staled and automatically removed and removed Stale labels Jun 18, 2024
@songy23 songy23 requested a review from mx-psi June 24, 2024 20:22
@mx-psi mx-psi merged commit 4623e7e into open-telemetry:main Jun 26, 2024
154 checks passed
@github-actions github-actions bot added this to the next release milestone Jun 26, 2024
@songy23 songy23 deleted the dd-connector branch June 26, 2024 13:45
tomasmota pushed a commit to SpringerPE/opentelemetry-collector-contrib that referenced this pull request Jul 1, 2024
…-telemetry#33297)

**Description:**
Add a feature gate `connector.datadogconnector.NativeIngest` that
enables datadog connector to use the new native OTel API in APM stats
computation. It is disabled by default.

Follow-up of DataDog/datadog-agent#23503.

---------

Co-authored-by: Pablo Baeyens <[email protected]>
lalith47 pushed a commit to lalith47/opentelemetry-collector-contrib that referenced this pull request Jul 1, 2024
…-telemetry#33297)

**Description:**
Add a feature gate `connector.datadogconnector.NativeIngest` that
enables datadog connector to use the new native OTel API in APM stats
computation. It is disabled by default.

Follow-up of DataDog/datadog-agent#23503.

---------

Co-authored-by: Pablo Baeyens <[email protected]>
cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this pull request Jul 11, 2024
…-telemetry#33297)

**Description:**
Add a feature gate `connector.datadogconnector.NativeIngest` that
enables datadog connector to use the new native OTel API in APM stats
computation. It is disabled by default.

Follow-up of DataDog/datadog-agent#23503.

---------

Co-authored-by: Pablo Baeyens <[email protected]>
@arielvalentin
Copy link
Contributor

@songy23 do you all have any benchmarks or details about the potential performance benefits of using native ingest API?

I want to know if it may help improve the overall performance of our collector pipelines.

@songy23
Copy link
Member Author

songy23 commented Aug 8, 2024

@arielvalentin if your traces have lots of attributes (especially when you have high cardinality of container tags), the new API has better throughput. If your traces are fairly small (with few attributes), the throughput / performance of old and new APIs are roughly on-par.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/configschema configschema command cmd/otelcontribcol otelcontribcol command connector/datadog exporter/datadog Datadog components never stale Issues marked with this label will be never staled and automatically removed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants