Skip to content
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

Add gogo/protobuf to OpenTelemetry OTLP data model #5067

Merged
merged 15 commits into from Jan 4, 2024

Conversation

yurishkuro
Copy link
Member

@yurishkuro yurishkuro commented Dec 31, 2023

Which problem is this PR solving?

Description of the changes

  • Apply gogo annotations to OTLP proto for generating more efficient data model

How was this change tested?

  • Unit tests

yurishkuro and others added 6 commits December 30, 2023 17:58
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Copy link

github-actions bot commented Jan 2, 2024

Test Results

2 083 tests  +30   2 073 ✅ +30   1m 9s ⏱️ ±0s
  220 suites + 1      10 💤 ± 0 
    1 files   ± 0       0 ❌ ± 0 

Results for commit 6134e73. ± Comparison against base commit e85c8fb.

♻️ This comment has been updated with latest results.

Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e85c8fb) 95.62% compared to head (6134e73) 95.54%.
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5067      +/-   ##
==========================================
- Coverage   95.62%   95.54%   -0.08%     
==========================================
  Files         314      320       +6     
  Lines       18296    18461     +165     
==========================================
+ Hits        17495    17639     +144     
- Misses        642      660      +18     
- Partials      159      162       +3     
Flag Coverage Δ
cassandra-3.x 25.59% <ø> (ø)
cassandra-4.x 25.59% <ø> (ø)
elasticsearch-5.x 19.86% <ø> (-0.02%) ⬇️
elasticsearch-6.x 19.87% <ø> (ø)
elasticsearch-7.x 20.01% <ø> (ø)
elasticsearch-8.x 20.08% <ø> (-0.02%) ⬇️
grpc-badger 19.51% <40.00%> (+<0.01%) ⬆️
kafka 14.10% <ø> (ø)
opensearch-1.x 20.01% <ø> (ø)
opensearch-2.x 20.01% <ø> (ø)
unittests 93.25% <100.00%> (-0.06%) ⬇️

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.

if len(s.ParentSpanId) == 0 {
// If ParentSpanId is empty array then gogo/jsonpb renders it as empty string.
// To match the output with grpc-gateway we set it to nil and it won't be included.
s.ParentSpanId = nil
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

field is not nullable so this fix is no longer possible

"status": {},
"status": {
"code": "STATUS_CODE_ERROR"
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this and span kind as examples of enums. This matches the previous output when using grpc-gateway marshaling (and is different from OTLP-JSON encoding).

"name": "foobar",
"parentSpanId": "",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could not find a way to suppress this empty field. In practice not a big deal all but one span in a trace will have non-empty parent. Also, verified that OTLP-JSON also includes empty parent ID.

@@ -0,0 +1,45 @@
// Copyright (c) 2023 The Jaeger Authors.
// Copyright The OpenTelemetry Authors
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied from OTEL, but had to change to marshal IDs as base64, to keep with the original grpc-gateway version.

yurishkuro and others added 6 commits January 2, 2024 23:42
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro marked this pull request as ready for review January 4, 2024 07:17
@yurishkuro yurishkuro requested a review from a team as a code owner January 4, 2024 07:17
@yurishkuro yurishkuro merged commit a7c5ef0 into jaegertracing:main Jan 4, 2024
40 checks passed
@yurishkuro yurishkuro deleted the otel-proto-gogo branch January 4, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define internal version of OTLP proto types using Gogo optimizations
1 participant