Skip to content

Conversation

@IbraheemA
Copy link
Contributor

@IbraheemA IbraheemA commented Nov 3, 2025

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.

@IbraheemA IbraheemA force-pushed the ibraheem/move-ddconnector-into-pkg branch from dc953ac to 57dabee Compare November 4, 2025 17:06
@github-actions github-actions bot added the exporter/datadog Datadog components label Nov 4, 2025
Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

LGTM overall

Copy link
Member

@songy23 songy23 left a 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

@jackgopack4
Copy link
Contributor

Will review tomorrow AM

Copy link
Contributor

@jackgopack4 jackgopack4 left a 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

Comment on lines +119 to +132
// ==== 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
Copy link
Contributor

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?

Copy link
Contributor Author

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

Comment on lines 144 to +147
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/")
Copy link
Contributor

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

Copy link
Contributor Author

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() {
Copy link
Contributor

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?

Copy link
Contributor Author

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

Comment on lines +167 to +169
if c.IgnoreMissingDatadogFields {
return errors.New("ignore_missing_datadog_fields is not yet supported in the connector")
}
Copy link
Contributor

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?

Copy link
Contributor Author

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

@songy23
Copy link
Member

songy23 commented Nov 5, 2025

@songy23 songy23 merged commit 5558a3f into open-telemetry:main Nov 5, 2025
189 checks passed
@github-actions github-actions bot added this to the next release milestone Nov 5, 2025
jelly-afk pushed a commit to jelly-afk/opentelemetry-collector-contrib that referenced this pull request Nov 6, 2025
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants