Skip to content

[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

Merged
merged 17 commits into from
Mar 20, 2025

Conversation

mahadzaryab1
Copy link
Collaborator

@mahadzaryab1 mahadzaryab1 commented Mar 16, 2025

Which problem is this PR solving?

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

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]>
@mahadzaryab1 mahadzaryab1 marked this pull request as draft March 16, 2025 20:53
Copy link

codecov bot commented Mar 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.13%. Comparing base (712c1bc) to head (e439cd9).
Report is 63 commits behind head on main.

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     
Flag Coverage Δ
badger_v1 10.20% <ø> (+0.32%) ⬆️
badger_v2 2.12% <ø> (+0.06%) ⬆️
cassandra-4.x-v1-manual 15.36% <ø> (+0.48%) ⬆️
cassandra-4.x-v2-auto 2.11% <ø> (+0.06%) ⬆️
cassandra-4.x-v2-manual 2.11% <ø> (+0.06%) ⬆️
cassandra-5.x-v1-manual 15.36% <ø> (+0.48%) ⬆️
cassandra-5.x-v2-auto 2.11% <ø> (+0.06%) ⬆️
cassandra-5.x-v2-manual 2.11% <ø> (+0.06%) ⬆️
elasticsearch-6.x-v1 20.15% <ø> (+0.60%) ⬆️
elasticsearch-7.x-v1 20.23% <ø> (+0.60%) ⬆️
elasticsearch-8.x-v1 20.40% <ø> (+0.61%) ⬆️
elasticsearch-8.x-v2 2.12% <ø> (+0.06%) ⬆️
grpc_v1 11.28% <ø> (+0.35%) ⬆️
grpc_v2 8.25% <ø> (+0.26%) ⬆️
kafka-3.x-v1 10.51% <ø> (+0.33%) ⬆️
kafka-3.x-v2 2.12% <ø> (+0.06%) ⬆️
memory_v2 2.12% <ø> (+0.06%) ⬆️
opensearch-1.x-v1 20.28% <ø> (+0.60%) ⬆️
opensearch-2.x-v1 20.28% <ø> (+0.60%) ⬆️
opensearch-2.x-v2 2.12% <ø> (+0.06%) ⬆️
tailsampling-processor 0.57% <ø> (+0.01%) ⬆️
unittests 94.92% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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]>
@@ -17,20 +14,3 @@ const (
// e.g. proto, thrift, json.
FormatAttribute = "@jaeger@format"
)

func PcommonMapToPlainMap(attributes pcommon.Map) map[string]string {
Copy link
Member

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.

Copy link
Collaborator Author

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]>
@mahadzaryab1 mahadzaryab1 marked this pull request as ready for review March 19, 2025 02:14
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>

func PcommonMapToPlainMap(attributes pcommon.Map) map[string]string {
mapAttributes := make(map[string]string)
attributes.Range(func(k string, v pcommon.Value) bool {
Copy link
Member

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()

Copy link
Member

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]>
@yurishkuro yurishkuro added this pull request to the merge queue Mar 20, 2025
Merged via the queue into jaegertracing:main with commit 663e450 Mar 20, 2025
56 checks passed
@mahadzaryab1 mahadzaryab1 deleted the grpc-find-trace-id branch April 2, 2025 17:13
@mahadzaryab1 mahadzaryab1 added changelog:exprimental Change to an experimental part of the code and removed changelog:bugfix-or-minor-feature labels Apr 2, 2025
amilbcahat pushed a commit to amilbcahat/jaeger that referenced this pull request May 4, 2025
…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]>
amilbcahat pushed a commit to amilbcahat/jaeger that referenced this pull request May 4, 2025
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage changelog:exprimental Change to an experimental part of the code v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants