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

Zipkin exporter add support for v1 api json format #1411

Merged

Conversation

robwknox
Copy link
Contributor

@robwknox robwknox commented Nov 23, 2020

Description

Adds support for the Zipkin Exporter v1 API json format . Since this brings the number of supported formats to 3 (v1-json, v2-json, v2-protobuf) and with v1-thrift on the way, the PR includes notable refactoring of the exporter to introduce the concept of an Encoder.

Breaking changes

  • ZipkinSpanExporter() signature changes:
    • service_name removed to conform to new spec
    • protocol mandatory arg added (required arg ordering change)
    • url => endpoint to be consistent with spec terminology and related env var OTEL_EXPORTER_ZIPKIN_ENDPOINT and package DEFAULT_ENDPOINT
    • ipv4 => local_node_ipv4 to more clearly denote this is for the local node endpoint
    • ipv6 => local_node_ipv6 to more clearly denote this is for the local node endpoint
    • local_node_port: added. This value was being improperly parsed from the url when it is supposed to represent the local node listening port. Added param so that it can be passed in along with the local node ip addresses if desired.
    • retry removed for now to avoid confusion since the logic is not currently implemented.

Fixes #1173

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • Manual testing against local zipkin server:
    • v1-json support
    • v1-json / v2-json / v2-protobuf output comparison testing
    • regression testing of v2-json and v2-protobuf
  • Unit tests have been greatly reworked & expanded.
  • Full tox run

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

…RANSPORT_FORMAT_JSON/PROTOBUF vals to not overload w/ Content-Type
….5 + a bug fix related to max_tag_value_length in the encoders
…ce_id() and encode_span_id() and base Encoder class
Base automatically changed from master to main January 29, 2021 16:49
Copy link
Contributor

@ocelotl ocelotl left a comment

Choose a reason for hiding this comment

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

Just nits, @robwknox would it be possible to address @lonewolf3739 comments?

Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my comments. LGTM.

@robwknox
Copy link
Contributor Author

@lonewolf3739 , @ocelotl , @codeboten believe all comments are addressed.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Just a minor change in the comment about the env variable. Solid refactor, thanks a lot!

@codeboten
Copy link
Contributor

@ocelotl has your change request been addressed? If so, please approve, thanks!

@ocelotl
Copy link
Contributor

ocelotl commented Feb 17, 2021

Sure, will review

@codeboten codeboten merged commit 03c6b73 into open-telemetry:main Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zipkin exporter must support Zipkin v1 JSON format
5 participants