-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[grpc][v2] Implement FindTraceIDs
Call in gRPC reader for remote storage api v2
#6858
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
[grpc][v2] Implement FindTraceIDs
Call in gRPC reader for remote storage api v2
#6858
Conversation
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6858 +/- ##
==========================================
+ Coverage 96.03% 96.13% +0.09%
==========================================
Files 367 341 -26
Lines 20831 19738 -1093
==========================================
- Hits 20005 18975 -1030
+ Misses 630 577 -53
+ Partials 196 186 -10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
internal/jptrace/attributes.go
Outdated
@@ -17,20 +14,3 @@ const ( | |||
// e.g. proto, thrift, json. | |||
FormatAttribute = "@jaeger@format" | |||
) | |||
|
|||
func PcommonMapToPlainMap(attributes pcommon.Map) map[string]string { |
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 would've kept it here. Creating too many top packages at internal just creates clutter, and in this case it's a new package for just a couple of functions.
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.
@yurishkuro I had to do this because of circular dependencies. proto-gen
uses jptrace.TracesData
and this package needs to use proto-gen
for converting to the key-value list. Let me know if you prefer a different approach. We could create a top-level jotel
and create sub-packages jptrace
and jpcommon
in there. Or alternatively move the TracesData
out of jptrace
.
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
internal/jpcommon/map.go
Outdated
|
||
func PcommonMapToPlainMap(attributes pcommon.Map) map[string]string { | ||
mapAttributes := make(map[string]string) | ||
attributes.Range(func(k string, v pcommon.Value) bool { |
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.
nit: I recommend using the new iterator methods, I think it will be attributes.All()
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.
unless they still haven't merged those, I thought they did in the last release
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
…orage api v2 (jaegertracing#6858) <!-- !! Please DELETE this comment before posting. We appreciate your contribution to the Jaeger project! 👋🎉 --> ## Which problem is this PR solving? - Towards jaegertracing#6789 ## Description of the changes - This PR implements the GetOperations call in the gRPC v2 API client - In the process, we also had to add a helper to convert a `pcommon.Map` to the proto representation `[]*KeyValue`. ## How was this change tested? - Added unit tests ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: Mahad Zaryab <[email protected]>
…orage api v2 (jaegertracing#6858) <!-- !! Please DELETE this comment before posting. We appreciate your contribution to the Jaeger project! 👋🎉 --> ## Which problem is this PR solving? - Towards jaegertracing#6789 ## Description of the changes - This PR implements the GetOperations call in the gRPC v2 API client - In the process, we also had to add a helper to convert a `pcommon.Map` to the proto representation `[]*KeyValue`. ## How was this change tested? - Added unit tests ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: Mahad Zaryab <[email protected]> Signed-off-by: amol-verma-allen <[email protected]>
Which problem is this PR solving?
Description of the changes
pcommon.Map
to the proto representation[]*KeyValue
.How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test