-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Use official OTLP types in api_v3 and avoid triple-marshaling #5098
Conversation
Signed-off-by: Yuri Shkuro <[email protected]>
Test Results2 085 tests - 1 2 075 ✅ - 1 1m 8s ⏱️ -1s Results for commit a9bb33e. ± Comparison against base commit 09f7a30. This pull request removes 2 and adds 1 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5098 +/- ##
==========================================
+ Coverage 95.55% 95.61% +0.05%
==========================================
Files 319 320 +1
Lines 18379 18394 +15
==========================================
+ Hits 17562 17587 +25
+ Misses 655 649 -6
+ Partials 162 158 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
cp -R idl/opentelemetry-proto/* $(PATCHED_OTEL_PROTO_DIR) | ||
find $(PATCHED_OTEL_PROTO_DIR) -name "*.proto" | xargs -L 1 $(SED) -i 's+go.opentelemetry.io/proto/otlp+github.com/jaegertracing/jaeger/proto-gen/otel+g' | ||
|
||
$(call proto_compile, proto-gen/api_v3, idl/proto/api_v3/query_service.proto, -I$(PATCHED_OTEL_PROTO_DIR)) |
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.
- enriching is no longer needed
- types are generated into an internal module now
@@ -180,9 +179,11 @@ func getServicesAPIV3(t *testing.T) { | |||
require.NoError(t, err) | |||
body, _ := io.ReadAll(resp.Body) | |||
|
|||
var servicesResponse api_v3.GetServicesResponse |
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 was unnecessary coupling. api_v3
is not internal and not accessible from here.
if err := proto.Unmarshal(b, &chunk); err != nil { | ||
return nil, fmt.Errorf("cannot marshal OTLP: %w", err) | ||
} | ||
return chunk.ResourceSpans, nil |
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.
no triple marshaling!
Signed-off-by: Yuri Shkuro <[email protected]>
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.
LGTM! pretty big PR and chunk of work. Nice job.
## Description of the changes - Remove unused internal OTLP types, as a follow-up on #5098 - Marking it "breaking" to show up next to #5098 in the changelog, since technically these are exposed APIs from Jaeger-as-a-library ## How was this change tested? - CI Signed-off-by: Yuri Shkuro <[email protected]>
Which problem is this PR solving?
Description of the changes
SpansResponseChunk
with officialotlp.TracesData
, but override it internally to use a custom typeHow was this change tested?