-
Notifications
You must be signed in to change notification settings - Fork 891
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
Invalid expectations of JSON format for Jaeger remote sampling strategies #3126
Comments
cc @jpkrohling (Collector) |
Rust implementation uses the HTTP response as JSON based on proto, it expects the enum to be string. So the example response We can support encoding enum as integer too. |
cc @frzifus, as the code owner for Jaeger components in the collector |
## Which problem is this PR solving? Related to open-telemetry/opentelemetry-specification#3126 ## Short description of the changes - changes the main `/sampling` endpoint to use Protobuf-based JSON marshaling instead of Thrift-based - adds unit tests to validate that the new endpoint is backwards compatible with Thrift-based serialization - opens the path to remove Thrift-based sampling data model throughout the codebase Signed-off-by: Yuri Shkuro <github@ysh.us>
## Which problem is this PR solving? - Related to open-telemetry/opentelemetry-specification#3126 ## Short description of the changes - Describe remote sampling API as official / stable, with examples. - Mark `/` endpoint on the agent as deprecated / not recommended. - Replace references to "Jaeger clients" with general "SDKs" where appropriate. - Add more warnings that Jaeger clients are deprecated. - Mention OTLP/JSON format as accepted. - Fix the positioning of the `Copy` button in the code snippets.
…#4173) ## Which problem is this PR solving? Related to open-telemetry/opentelemetry-specification#3126 ## Short description of the changes - changes the main `/sampling` endpoint to use Protobuf-based JSON marshaling instead of Thrift-based - adds unit tests to validate that the new endpoint is backwards compatible with Thrift-based serialization - opens the path to remove Thrift-based sampling data model throughout the codebase Signed-off-by: Yuri Shkuro <github@ysh.us>
…#4173) ## Which problem is this PR solving? Related to open-telemetry/opentelemetry-specification#3126 ## Short description of the changes - changes the main `/sampling` endpoint to use Protobuf-based JSON marshaling instead of Thrift-based - adds unit tests to validate that the new endpoint is backwards compatible with Thrift-based serialization - opens the path to remove Thrift-based sampling data model throughout the codebase Signed-off-by: Yuri Shkuro <github@ysh.us> Signed-off-by: shubbham1215 <sawaikershubham@gmail.com>
What are you trying to achieve?
Make OpenTelemetry SDKs work with Jaeger remote sampling (raised in discussion jaegertracing/jaeger#4142).
Problem
The OpenTelemetry specification did not fully specify the requirements for samplers that support Jaeger remote sampling protocol. Specifically, it referred to gRPC sampling.proto making it look like this is the format that samplers must support. However, this is not the protocol that was used by the original Jaeger SDK samplers.
A bit of history:
jaeger_agent::5778/
endpoint, and the output could like like this:{"strategyType":0, "probabilisticSampling":{"samplingRate":1}}
. Note that thestrategyType
enum is represented as a number. Also note that the agents only served the endpoint, but the actual strategy for a service was determined by the Jaeger collector, and agents simply proxied the SDKs HTTP requests to collector's Thrift endpoint.{"strategyType":"PROBABILISTIC", "probabilisticSampling":{"samplingRate":1}}
. The Jaeger SDKs were upgraded to parse this format, but to maintain backwards compatibility with existing SDKs in production the new format was instead exposed at a new endpointjaeger_agent::5778/sampling
. The/
endpoint still continued to return the old format.The current state in OpenTelemetry:
even though it's not documented as such https://www.jaegertracing.io/docs/1.41/apis/, to be fixedfixed). Curiously, it is also using a custom-written parser for proto, instead of the standard libs.encoding/json
module to parse the JSON payload into a struct generated from sampling.proto, which means it expects enums as integers. That format has never been used by the Jaeger backend, but coincidentally it matches the deprecated Thrift v0.9.2 format. Thus, the Go SDK seems to work against the deprecatedjaeger_agent::5778/
endpoint, but not OTel Collector. [samplers/jaegerremote] Invalid expectation of JSON format opentelemetry-go-contrib#3184encoding/json
module, both on the legacy/
endpoint and on the "official" Jaeger endpoint/sampling
How to proceed from here
/sampling
(agent) and/api/sampling
(collector) endpoints, which is backwards compatible with Thrift-based serializationjaeger_agent::5778/
The text was updated successfully, but these errors were encountered: