-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[exporter/datadog] Expose source provider #37668
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
[exporter/datadog] Expose source provider #37668
Conversation
This warrants an API changelog too |
CI failures will be solved once #37499 is merged |
@songy23 If we only use |
need to 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.
I believe you need to add metadata.yaml to internal/datadog, like this one http://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/datadog/metadata.yaml
then run make generate
again
Thanks @songy23, added |
|
You're still missing something (not sure what exactly is missing). |
Yeah, noticed that. Will try running make generate agaiin |
@songy23 make generate didn't add it, so i added manually |
#### Description The goal of this PR is to expose the `GetSourceProvider` method from hostmetadata, which is currently under an internal folder in datadogexporter. In order to do so, we create new package `github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/hostmetadata` which calls on internal hostmetadata's `GetSourceProvider`. We also create new module `github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog`, where we store the internal `hostmetadata`, `clientutil` and `scrub` packages. We move `hostmetadata` there as it needs to be imported in both datadogexporter, and `pkg/datadog/hostmetadata`, and we move `clientutil` and `scrub` there as they are imported by `hostmetadata`. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> --------- Co-authored-by: Yang Song <[email protected]>
Description
The goal of this PR is to expose the
GetSourceProvider
method from hostmetadata, which is currently under an internal folder in datadogexporter.In order to do so, we create new package
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/hostmetadata
which calls on internal hostmetadata'sGetSourceProvider
.We also create new module
github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog
, where we store the internalhostmetadata
,clientutil
andscrub
packages. We movehostmetadata
there as it needs to be imported in both datadogexporter, andpkg/datadog/hostmetadata
, and we moveclientutil
andscrub
there as they are imported byhostmetadata
.Link to tracking issue
Fixes
Testing
Documentation