-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[exporter/datadog] Fix duplicate sent log records in logs agent exporter #33887
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] Fix duplicate sent log records in logs agent exporter #33887
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add an integration test to validate it? You'll need to add a handler for api/v2/series
in https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/datadogexporter/internal/testutil/logs.go#L42 then use the DatadogLogsServer
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
exporter/datadogexporter/integrationtest/integration_test_logs_config.yaml
Show resolved
Hide resolved
exporter/datadogexporter/integrationtest/integration_test_logs_config.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description:
We were calling
exporterhelper.NewLogsExporter
twice when instantiating the logs agent exporter: once in the datadogexporter factory method and once in the logs agent exporter factory method. This resulted in theotelcol_exporter_sent_log_records
reporting double the amount of logs being sent. This PR removes the latter call by usinglogsagentexporter.NewExporter
directly.Link to tracking Issue:
Testing:
Verified locally that
otelcol_exporter_sent_log_records
reports the correct number of sent logs now, and added integration test.Documentation: