-
Notifications
You must be signed in to change notification settings - Fork 6
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
[pkg/otlp/logs] Switch to Translator design #230
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.
Note about the hideous diff: I renamed logs_translator.go
to transform.go
and then added the translator in logs_translator.go
The usage on the Agent would look like this https://github.com/DataDog/datadog-agent/blob/bca34b6e8668b8986486e74e2e88c33be81d34b1/comp/otelcol/otlp/internal/logsagentexporter/logs_exporter.go#L41-L68 |
pkg/otlp/logs/logs_translator.go
Outdated
@@ -15,251 +15,49 @@ | |||
package logs |
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.
Can u rename the file to translator.go
?
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 - can merge after fixing the file name
**Description:** - [*/datadog] Bump to opentelemetry-mapping-go v0.11.0. This includes: - Refactor related to upcoming metric: - DataDog/opentelemetry-mapping-go/pull/230 - DataDog/opentelemetry-mapping-go/pull/231 - DataDog/opentelemetry-mapping-go/pull/229 - Host metadata updates: - DataDog/opentelemetry-mapping-go/pull/184 - DataDog/opentelemetry-mapping-go/pull/225 - Use `logs.Translator` for logs implementation - Set `MeterProvider` to noop to prevent sending metrics for now until we agree on the design. Note that I reverted one of the changelog items added in #29785, since it's no longer true that we add this metric.
…y#30158) **Description:** - [*/datadog] Bump to opentelemetry-mapping-go v0.11.0. This includes: - Refactor related to upcoming metric: - DataDog/opentelemetry-mapping-go/pull/230 - DataDog/opentelemetry-mapping-go/pull/231 - DataDog/opentelemetry-mapping-go/pull/229 - Host metadata updates: - DataDog/opentelemetry-mapping-go/pull/184 - DataDog/opentelemetry-mapping-go/pull/225 - Use `logs.Translator` for logs implementation - Set `MeterProvider` to noop to prevent sending metrics for now until we agree on the design. Note that I reverted one of the changelog items added in open-telemetry#29785, since it's no longer true that we add this metric.
What does this PR do?
Move to a
Translator
struct design for logs. This is part of the refactor for accomplishing #222, I need to do this so that:logs.Translator
SourceFromAttrs
once per log record, we can just call it once per resource.Motivation