[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 |
Co-authored-by: Yang Song <songy23@users.noreply.github.com>
songy23
left a comment
There was a problem hiding this comment.
I believe you need to add metadata.yaml to internal/datadog, like this one https://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 <songy23@users.noreply.github.com>
Description
The goal of this PR is to expose the
GetSourceProvidermethod 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/hostmetadatawhich calls on internal hostmetadata'sGetSourceProvider.We also create new module
github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog, where we store the internalhostmetadata,clientutilandscrubpackages. We movehostmetadatathere as it needs to be imported in both datadogexporter, andpkg/datadog/hostmetadata, and we moveclientutilandscrubthere as they are imported byhostmetadata.Link to tracking issue
Fixes
Testing
Documentation