-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Migrate Jaeger internal packages to OTEL contrib and update import paths #37999
Draft
AdityaS8804
wants to merge
11
commits into
open-telemetry:main
Choose a base branch
from
AdityaS8804:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+5,411
−23
Draft
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0552076
Migrate Jaeger internal packages to OTEL contrib
AdityaS8804 d56e9a1
Merge branch 'main' of https://github.com/AdityaS8804/opentelemetry-c…
AdityaS8804 f8b3f2f
Changed paths of migrated code to jaegerreceiver/internal; Added OTEL…
AdityaS8804 8b28155
Removed jaegerreceiver/configmanager/grpc
AdityaS8804 a4a8b8a
Removed jaegerreceiver/configmanager/grpc
AdityaS8804 c0502a3
Added OTEL Metric SDK for receiver/jaegerreceiver/internal/pkg/metrics
AdityaS8804 3847de4
Added required files for tests in jaegerreceiver/internal/testdata
AdityaS8804 0964d42
Added
AdityaS8804 5c54fd8
Added
AdityaS8804 2818127
Added previous metric implementation
AdityaS8804 bd3c06f
Removed commenting errors
AdityaS8804 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
Added OTEL Metric SDK for receiver/jaegerreceiver/internal/pkg/metrics
- Loading branch information
commit c0502a3b107cc9810719012fc6bcac754d3f8d8d
There are no files selected for viewing
This file contains 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 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 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 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
20 changes: 18 additions & 2 deletions
20
receiver/jaegerreceiver/internal/pkg/metrics/histogram.go
100755 → 100644
This file contains 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
Empty file.
This file contains 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// utils.go | ||
// Utility functions for the metrics package. | ||
package metrics | ||
|
||
import ( | ||
"go.opentelemetry.io/otel/attribute" | ||
) | ||
|
||
// convertTags converts a map of tags to a slice of attribute.KeyValue. | ||
func convertTags(tags map[string]string) []attribute.KeyValue { | ||
var attrs []attribute.KeyValue | ||
for k, v := range tags { | ||
attrs = append(attrs, attribute.String(k, v)) | ||
} | ||
return attrs | ||
} |
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.
Hey @yurishkuro, you recommended replacing the metrics with the OTEL metrics SDK. With respect to that I have a quick question—should we be relying on the metric tags (like service=my_service) for setting the OTEL service, or do we have a dedicated service input (maybe from config/env) that sets the OTEL resource’s service.name?
Could you please point to where we might be getting this service information.
And could you clarify if I am on the right track.
Thanks!
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.
In agent metrics the service is from the observed spans, not the collector service.
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.
Yeah I looked into it and I tried an implementation with otel. Please review the same
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.
Can you remove all the metrics packages from this PR? Leave only the business logic you're adding.
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.
Hey, so I reverted to the old metric implementation and kept the rest of the business logic as is.
Does that align with the requirements?