-
Notifications
You must be signed in to change notification settings - Fork 366
Geneva exporter: Support resource attributes in log exporter #3646
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
Merged
rajkumar-rangaraj
merged 20 commits into
open-telemetry:main
from
mattsains:logs-resources
Jan 13, 2026
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
e369add
implement resource attributes for geneva logs
mattsains d6c3940
fix indentation
mattsains 1b8bec5
add tests for cloud extension
mattsains 604fd2b
a bunch of changes to re-up the branch
mattsains 70d310c
more tests
mattsains 5805669
fixed all tests
mattsains a53b3bf
fix test
mattsains 6149cb1
proof reading
mattsains 988a757
.net format
mattsains ccfb2fd
changelog
mattsains 0538e92
fix test
mattsains 9987054
fix test
mattsains 2d6fc06
fix linux test
mattsains 98a159f
add test for auto-mapped resource attrs
mattsains 50b68dd
fix tests
mattsains 630b3ab
gate cloud extension mapping by prepopulated fields
mattsains 4fe80cb
Update src/OpenTelemetry.Exporter.Geneva/CHANGELOG.md
mattsains 0393845
keep using frozen dictionary as much as practical
mattsains 6c2a3eb
fix semicolon
mattsains 1469019
respond to PR comments
mattsains File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should this have a null check? If
ParentProviderhasn't been set when export is called (possible during SDK initialization edge cases), this will throw NRE. Consider: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'll change it but I notice that if ParentProvider can really be null, then the existing metric code is also broken: https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/main/src/OpenTelemetry.Exporter.Geneva/Metrics/GenevaMetricExporter.cs#L112
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.
What does this mean? Is it a bug or not?
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.
This is not a bug; the wording may have caused the confusion.
In the existing implementation,
this.ParentProvider.GetResource()itself already returnsResource.Emptywhen no provider is set, so it is safe. We don’t need to add an explicit null check here or manually setResource.Emptyagain.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.
Thanks @rajkumar-rangaraj! Then this sounds wrong and should be reverted back.
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.
Yes, this needs a fix. I will send a follow-up PR.