Skip to content

💤 Swap Zipkin server for Zipkin Receiver from OTel Collector Contrib#5045

Merged
yurishkuro merged 15 commits intojaegertracing:mainfrom
yurishkuro:zipkin-swagger
Dec 27, 2023
Merged

💤 Swap Zipkin server for Zipkin Receiver from OTel Collector Contrib#5045
yurishkuro merged 15 commits intojaegertracing:mainfrom
yurishkuro:zipkin-swagger

Conversation

@yurishkuro
Copy link
Copy Markdown
Member

@yurishkuro yurishkuro commented Dec 26, 2023

Which problem is this PR solving?

  • Remove duplicated code for handling Zipkin formats that requires a dependency on open-api packages
  • This will also help with jaeger-v2 since we'll just reuse the same OTEL Zipkin receiver, no more breaking changes

Description of the changes

  • Swap custom Zipkin server for Zipkin Receiver from OTel Collector Contrib
    • (breaking 🛑) Zipkin Proto receiver requires 128bit trace ID, otherwise TraceID: has length 8 yet wanted length 16. Jaeger receiver did not have such limitation.
    • (breaking 🛑) the --collector.zipkin.keep-alive setting is not supported in the OTEL receiver
  • Delete a bunch of packages and files that are no longer needed (5k lines, including code-gen)
  • go mod tidy removed all go-openapi dependencies and a few others

How was this change tested?

  • Added unit tests cmd/collector/app/handler/zipkin_receiver_test.go that submit various Zipkin formats to the receiver
  • Crossdock tests also cover similar exports in CI:
Executing Matrix...
✓ [endtoend] test_driver→ (services=go) ⇒ Pass
✓ [endtoend] test_driver→ (services=java) ⇒ Pass
✓ [endtoend] test_driver→ (services=node) ⇒ Pass
✓ [endtoend] test_driver→ (services=python) ⇒ Pass
✓ [endtoend] test_driver→ (services=zipkin-brave-json) ⇒ Pass
✓ [endtoend] test_driver→ (services=zipkin-brave-json-v2) ⇒ Pass
✓ [endtoend] test_driver→ (services=zipkin-brave-proto) ⇒ Pass
✓ [endtoend] test_driver→ (services=zipkin-brave-thrift) ⇒ Pass

Checklist

Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro requested a review from a team as a code owner December 26, 2023 21:43
@yurishkuro yurishkuro changed the title Swap Zipkin server for receiver from OTel Collector Contrib Swap Zipkin server for Zipkin Receiver from OTel Collector Contrib Dec 26, 2023
@yurishkuro yurishkuro added the changelog:breaking-change Change that is breaking public APIs or established behavior label Dec 26, 2023
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>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
@@ -0,0 +1,79 @@
[
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I used the existing zipkin_v1_merged_spans.json file (Zipkin JSON v1), converged into object model, and re-serialized as JSON. It uses different representations for many fields, like raw numbers instead of hex strings for IDs.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 27, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (9138be4) 95.58% compared to head (5b43341) 95.55%.

Files Patch % Lines
cmd/collector/app/collector.go 58.33% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5045      +/-   ##
==========================================
- Coverage   95.58%   95.55%   -0.04%     
==========================================
  Files         319      313       -6     
  Lines       18794    18161     -633     
==========================================
- Hits        17965    17353     -612     
+ Misses        665      647      -18     
+ Partials      164      161       -3     
Flag Coverage Δ
cassandra-3.x 25.61% <ø> (ø)
cassandra-4.x 25.61% <ø> (ø)
elasticsearch-5.x 19.88% <ø> (ø)
elasticsearch-6.x 19.87% <ø> (ø)
elasticsearch-7.x 20.02% <ø> (+0.01%) ⬆️
elasticsearch-8.x 20.09% <ø> (-0.02%) ⬇️
grpc-badger 19.50% <ø> (ø)
kafka 14.10% <ø> (ø)
opensearch-1.x 20.02% <ø> (+0.01%) ⬆️
opensearch-2.x 20.02% <ø> (ø)
unittests 93.21% <91.22%> (-0.12%) ⬇️

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.

Signed-off-by: Yuri Shkuro <github@ysh.us>
"spans": [
{
"trace_id": "AAAAAAAAAAI=",
"trace_id":"QoVouqoJRn5CjmiKqglGfw==",
Copy link
Copy Markdown
Member Author

@yurishkuro yurishkuro Dec 27, 2023

Choose a reason for hiding this comment

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

(breaking 🛑) had to change this because of the error TraceID: has length 8 yet wanted length 16. Jaeger receiver did not have such limitation.

Signed-off-by: Yuri Shkuro <github@ysh.us>
// limitations under the License.

package server
package handler
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was testing exhaustively TLS settings on Zipkin endpoint, so I decided to keep it, just move from a different location. It works against the Zipkin receiver now.

yurishkuro and others added 2 commits December 26, 2023 20:21
Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro changed the title Swap Zipkin server for Zipkin Receiver from OTel Collector Contrib 💤 Swap Zipkin server for Zipkin Receiver from OTel Collector Contrib Dec 27, 2023
Copy link
Copy Markdown
Contributor

@jkowall jkowall left a comment

Choose a reason for hiding this comment

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

lgtm. One potential issue is keeping this sync with the upstream Otel changes. I do not think this will happen much with Zipkin being stagnant but it's a potential point of additional work.

@yurishkuro
Copy link
Copy Markdown
Member Author

yurishkuro commented Dec 27, 2023

What sync are you referring to? Basically my plan is to only use OTEL's implementation going forward and if any issues direct them upstream.

We still support Zipkin Thrift in the agent, which is a separate implementation, but we should be able to remove it once we sunset the agent.

@yurishkuro yurishkuro merged commit 8b6ede9 into jaegertracing:main Dec 27, 2023
@yurishkuro yurishkuro deleted the zipkin-swagger branch December 27, 2023 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:breaking-change Change that is breaking public APIs or established behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants