-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[*/datadog] Move datadogconnector functionality into pkg/datadog #43980
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
[*/datadog] Move datadogconnector functionality into pkg/datadog #43980
Conversation
35bb09d to
00754ea
Compare
dc953ac to
57dabee
Compare
songy23
left a comment
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 overall
songy23
left a comment
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.
Need to fix lint & test, otherwise looks good
|
Will review tomorrow AM |
jackgopack4
left a comment
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.
overall looks good just had a few small questions
| // ==== START for DDOT | ||
| if hostname, found := hostnameOpt.Get(); found { | ||
| acfg.Hostname = hostname | ||
| } | ||
| if tagger != nil { | ||
| acfg.ContainerTags = func(cid string) ([]string, error) { | ||
| return tagger.Tag(types.NewEntityID(types.ContainerID, cid), types.HighCardinality) | ||
| } | ||
| } | ||
| if len(cfg.ResourceAttributesAsContainerTags) > 0 { | ||
| acfg.Features["enable_cid_stats"] = struct{}{} | ||
| delete(acfg.Features, "disable_cid_stats") | ||
| } | ||
| // ==== END for DDOT |
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.
is getTraceAgentCfg only used for DDOT? how is this logic filtered/selected?
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.
This particular section uses arguments that are only relevant for DDOT; we simply don't pass the args when calling the ctor in OSS
| if !featuregates.OperationAndResourceNameV2FeatureGate.IsEnabled() { | ||
| acfg.Features["disable_operation_and_resource_name_logic_v2"] = struct{}{} | ||
| } else { | ||
| logger.Info("Please enable feature gate datadog.EnableOperationAndResourceNameV2 for improved operation and resource name logic. The v1 logic will be deprecated in the future - if you have Datadog monitors or alerts set on operation/resource names, you may need to migrate them to the new convention. See the migration guide at https://docs.datadoghq.com/opentelemetry/guide/migrate/migrate_operation_names/") |
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.
don't need any changes here but when do we plan to remove the "disable operation and resource v2" gate in agent
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.
We've passed the 12 week grace period for this flag - I'll assess a deprecation along with my other in flight changes to span translation in agent
|
|
||
| // run awaits incoming stats resulting from the agent's ingestion, converts them | ||
| // to metrics and flushes them using the configured metrics exporter. | ||
| func (c *traceToMetricConnectorNative) run() { |
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.
is this change because we are removing the non-native metric connector as part of this change?
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.
yes, thought the "native" suffix would be confusing if it's the only implementation
| if c.IgnoreMissingDatadogFields { | ||
| return errors.New("ignore_missing_datadog_fields is not yet supported in the connector") | ||
| } |
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.
what's the need for this again?
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.
This config option is used in the exporter (relevant for datadogsemanticsprocessor), and the two share the same TracesConfig
|
Need to fix collector module versions: https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/19114148284/job/54618706223?pr=43980 |
…n-telemetry#43980) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Replaces open-telemetry#43755 Refactor datadog modules in order to expose NewConnectorFactoryForAgent method that datadog-agent repo will import to instantiate datadogconnector in DDOT. Also fix a bug in connector.
Description
Replaces #43755
Refactor datadog modules in order to expose NewConnectorFactoryForAgent method that datadog-agent repo will import to instantiate datadogconnector in DDOT.
Also fix a bug in connector.