Skip to content
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

[connector/datadog] Allow export to traces pipelines #27846

Merged
merged 4 commits into from
Oct 19, 2023

Conversation

songy23
Copy link
Member

@songy23 songy23 commented Oct 18, 2023

Description:
Allow datadogconnector export to traces pipelines

Link to tracking Issue:

Testing:

Documentation:

@songy23 songy23 marked this pull request as ready for review October 18, 2023 18:28
@songy23 songy23 requested a review from mx-psi as a code owner October 18, 2023 18:28
@songy23 songy23 requested a review from a team October 18, 2023 18:28
@songy23
Copy link
Member Author

songy23 commented Oct 18, 2023

cc @dineshg13

Copy link
Member

@dineshg13 dineshg13 left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot requested a review from gbbr October 19, 2023 07:47
connector/datadogconnector/connector.go Show resolved Hide resolved
}

func createTracesToTracesConnector(_ context.Context, params connector.CreateSettings, cfg component.Config, nextConsumer consumer.Traces) (connector.Traces, error) {
c, err := newConnector(params.Logger, cfg, nil, nextConsumer)
Copy link
Member

Choose a reason for hiding this comment

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

Should the traces-to-traces and traces-to-metrics instances be the same connector? Right now they are two different independent instances of the connector. I think there is no shared state so it shouldn't matter but I want to double check

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean use a singleton instance for connector? That doesn't seem a common practice for collector components AFAIS.

Otherwise I don't think traces-to-traces and traces-to-metrics connectors can be the same instance

  • traces-to-traces only has trace consumer, no metrics consumer
  • traces-to-metrics only has metrics consumer, no traces consumer

Copy link
Member

Choose a reason for hiding this comment

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

You mean use a singleton instance for connector? That doesn't seem a common practice for collector components AFAIS.

I meant a singleton per config, the same way it is done for e.g. the OTLP receiver:
https://github.com/open-telemetry/opentelemetry-collector/blob/287b98f6973fd6baa278150b9fca8c83abea0af4/receiver/otlpreceiver/factory.go#L71-L77

Otherwise I don't think traces-to-traces and traces-to-metrics connectors can be the same instance

The worry is that we may need to share state via the trace Agent. I don't think it's a concern today though, right? (as in, no shared state in the trace agent that would be relevant). That's what I wanted to confirm

@mx-psi mx-psi merged commit 1842e13 into open-telemetry:main Oct 19, 2023
83 checks passed
@songy23 songy23 deleted the dd-con-fix branch October 19, 2023 13:39
@github-actions github-actions bot added this to the next release milestone Oct 19, 2023
martin-majlis-s1 pushed a commit to scalyr/opentelemetry-collector-contrib that referenced this pull request Oct 20, 2023
…27846)

**Description:** <Describe what has changed.>
Allow datadogconnector export to traces pipelines

**Link to tracking Issue:** <Issue number if applicable>

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>

---------

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
sigilioso pushed a commit to carlossscastro/opentelemetry-collector-contrib that referenced this pull request Oct 27, 2023
…27846)

**Description:** <Describe what has changed.>
Allow datadogconnector export to traces pipelines

**Link to tracking Issue:** <Issue number if applicable>

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>

---------

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this pull request Nov 12, 2023
…27846)

**Description:** <Describe what has changed.>
Allow datadogconnector export to traces pipelines

**Link to tracking Issue:** <Issue number if applicable>

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>

---------

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
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