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

feat(trace-exporter): use the same resource mapping for metrics and traces #635

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

aabmass
Copy link
Contributor

@aabmass aabmass commented Oct 5, 2023

Fixes #553

Deprecate the includeUnsupportedResources parameter by splitting the function def into a deprecated and non-deprecated overload. It is no longer needed as we decide that trace and monitoring exporters should do the exact same resource mapping. The package is marked stable so I full removal would be a breaking change.

This is equivalent to what we do in Go and Java GoogleCloudPlatform/opentelemetry-operations-java#250

…races

In the trace exporter, stop passing `includeUnsupportedResources` param
(false by default). This param controls if the mapping function should
return `cloud_run_revision` and `cloud_function` monitored resources.
This is equivalent to what we do in [Go](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/blob/v0.44.0/internal/resourcemapping/resourcemapping.go) and Java GoogleCloudPlatform/opentelemetry-operations-java#250

Deprecate the `includeUnsupportedResources` parameter by splitting the
function def into a deprecated and non-deprecated overload. It is no
longer needed but the package is marked stable so I will save the
breaking change.
@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #635 (7c03acb) into main (db2664c) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 7c03acb differs from pull request most recent head 8f9fad7. Consider uploading reports for the commit 8f9fad7 to get more accurate results

@@           Coverage Diff           @@
##             main     #635   +/-   ##
=======================================
  Coverage   97.69%   97.69%           
=======================================
  Files          18       18           
  Lines         693      693           
  Branches      129      129           
=======================================
  Hits          677      677           
  Misses         16       16           
Files Coverage Δ
...pentelemetry-cloud-trace-exporter/src/transform.ts 99.06% <100.00%> (ø)
packages/opentelemetry-resource-util/src/index.ts 100.00% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@aabmass aabmass force-pushed the same-resource-mappings branch from eae7a2b to 8f9fad7 Compare October 5, 2023 03:50
@aabmass aabmass marked this pull request as ready for review October 5, 2023 03:55
@aabmass aabmass requested a review from a team as a code owner October 5, 2023 03:55
@aabmass aabmass merged commit 2e789b0 into GoogleCloudPlatform:main Oct 5, 2023
@aabmass aabmass deleted the same-resource-mappings branch October 5, 2023 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update resource detection mapping to be compliant with metric exporter spec
2 participants