Refactor /comp/core/telem to follow components v2 patterns - #42069
Refactor /comp/core/telem to follow components v2 patterns#42069scottopell wants to merge 17 commits into
Conversation
…nsumers This refactoring moves telemetry to a def/impl/impl-noop/fx structure to enable clean separation between interface definitions (no prometheus) and implementations, allowing third-party consumers of pkg/trace to avoid the prometheus dependency tree. Cascading updates to all comp/core modules to use new telemetry/def.
Added missing import for telemetry/def to fix undefined references.
Changed createAtel parameter from telemetry.Component to telemetryimpl.Component to match the actual dependencies.
Changed from telemetry.MetricFamily to dto.MetricFamily.
Go Package Import DifferencesBaseline: 6d8fc84
|
agagniere
left a comment
There was a problem hiding this comment.
It seems several imports were renamed but the code using them wasn't
| package infraattributesprocessor | ||
|
|
||
| import ( | ||
| "github.com/DataDog/datadog-agent/comp/core/telemetry/noopsimpl" |
There was a problem hiding this comment.
could be named telemetry-noop-impl or telemetry-impl-noop because the current file is outside temlemetry.
More importantly, you forgot to rename it when using it (line 16)
| "fmt" | ||
| "strings" | ||
|
|
||
| "github.com/DataDog/datadog-agent/comp/core/telemetry" |
There was a problem hiding this comment.
could be called telemetry-def, and don't forget to rename it on uses e.g. line 87
| import ( | ||
| "fmt" | ||
|
|
||
| "github.com/DataDog/datadog-agent/comp/core/telemetry" |
There was a problem hiding this comment.
Same comment, telemetry-def and rename it when using it (e.g. line 57)
|
This pull request has been automatically marked as stale because it has not had activity in the past 15 days. It will be closed in 30 days if no further activity occurs. If this pull request is still relevant, adding a comment or pushing new commits will keep it open. Also, you can always reopen the pull request if you missed the window. Thank you for your contributions! |
What does this PR do?
Refactor comp/core/telemetry to multi-module architecture + update consumers
Motivation
Instrumenting trace-agent with prometheus needed a way to use the
telemetrycomponent without causing any importers of
pkg/traceto pull in the prometheusgolang client library.
Describe how you validated your changes
Pending, did basic evals locally, will expand this section.
Additional Notes
Trace-agent instrumentation will be done in subsequent PR