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

Add WithResourceAttributes option #522

Merged
merged 11 commits into from
Nov 23, 2023

Conversation

edeNFed
Copy link
Contributor

@edeNFed edeNFed commented Nov 21, 2023

This PR adds WithAdditionalResourceAttributes which allows users to pass additional resource attributes that should be reported by the instrumentation

@edeNFed edeNFed requested a review from a team November 21, 2023 11:32
instrumentation.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@edeNFed edeNFed changed the title Add WithAdditionalResourceAttributes option Add WithResourceAttributes option Nov 22, 2023
instrumentation_test.go Outdated Show resolved Hide resolved
instrumentation.go Outdated Show resolved Hide resolved
instrumentation_test.go Outdated Show resolved Hide resolved
Copy link
Member

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

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

Outside of @pellared's suggestions, I think this looks good.

Have you done any testing of how this works alongside the SDK picking up resource attributes from the OTEL_RESOURCE_ATTRIBUTES environment variable? I believe it should be fine as the two sets of attributes will be merged as part of the resource.NewWithAttributes call.

@edeNFed
Copy link
Contributor Author

edeNFed commented Nov 23, 2023

Thanks @MikeGoldsmith I added some more test cases

Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

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

👍

@edeNFed edeNFed merged commit 13e4693 into open-telemetry:main Nov 23, 2023
14 checks passed
@edeNFed edeNFed deleted the add-resource-attributes branch November 23, 2023 13:04
@MrAlias MrAlias added this to the v0.9.0-alpha milestone Dec 12, 2023
@MrAlias MrAlias mentioned this pull request Dec 12, 2023
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.

5 participants