-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support for query-path OTLP #9233
Comments
Can 2. be done in a separate package from pdata? |
No, because it needs to reference |
added concrete proposal |
Can it be done on a separate module inside the |
I suppose, as long as it has access to |
@open-telemetry/collector-maintainers what do you think about having this on a separate module? Could be something like |
First proposalHere is a path that I know about, it may be a bit ugly but tell me if that satisfy your requirement.
Second proposalAnother option is to change a bit your public gRPC definition to be: message SpansResponseChunk {
opentelemetry.proto.trace.v1.TracesData traces = 1;
... // may have later other properties.
} Then only in the server that uses the pdata, change the definition to an wire equivalent that allows you to directly use the bytes: message SpansResponseChunk {
bytes traces = 1; // populate using https://github.com/open-telemetry/opentelemetry-collector/blob/main/pdata/ptrace/pb.go
... // may have later other properties.
} |
## Which problem is this PR solving? - Part of #5079 - Avoid triple marshaling due to our use of internally generated OTLP proto types, which prevents us from directly using the output of jaeger->otlp conversion from collector contrib. ## Description of the changes - 🛑 breaking: the JSON format is changed to match [OTLP-JSON][otlp-json], specifically - the trace & span IDs are returned as hex-encoded strings, not base64 as required by Proto-JSON - enums are returned as integers, not strings - Use Proposal 1 from open-telemetry/opentelemetry-collector#9233 (comment) - API-V3 proto is already declared to use official OTLP types; remove the overrides to our internally generated OTLP proto types - Replace `SpansResponseChunk` with official `otlp.TracesData`, but override it internally to use a custom type - Depends on jaegertracing/jaeger-idl#103 ## How was this change tested? - Unit tests [otlp-json]: https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#json-protobuf-encoding --------- Signed-off-by: Yuri Shkuro <[email protected]>
@bogdandrutu proposal 1 did the trick, thanks! |
Is your feature request related to a problem? Please describe.
Jaeger-v2 is being reengineered to run as a custom build of OTel-collector (jaegertracing/jaeger#4843). The existing implementations of Jaeger's "exporter"-equivalents (aka Storage implementations) are using Jaeger's internal data model, which requires transformation from incoming OTLP from the receivers. We want to avoid this and change storage implementations to work directly with OTLP.
By being tightly integrated with OTEL pipeline, it means that the write path in our storage implementations will use pdata/ptrace. No particular issues here.
However, Jaeger also implements a query / read path, for example:
Ideally, the responses from these RPCs should also return OTLP. However, this requires integration at the level of generated protobuf types, which are hidden in OTel-collector. The only way we were able to do this today is to generate our own otlp types, and then perform multiple transforms: otel-pdata -> binary proto -> jaeger-otlp -> final output.
Describe the solution you'd like
Ideally, I would like to have our internal Storage API (read side) to use pdata, e.g.
and the gRPC definition to remain the same as shown above, and use the most efficient way of translating
ptrace.Traces -> SpansResponseChunk
protobuf messages. This requires some support from OTEL-collector to make this possible. I don't know what that is exactly, e.g.:ExportTraceServiceResponse
is supported, but a new type that actually contains traces (essentially an equivalent ofSpansResponseChunk
above)Describe alternatives you've considered
I've explored a number of alternatives, documented here.
My two possible, but not ideal, solutions right now are:
pdata
at all in the read path of Storage API, use some internal version of OTLPpdata
into Jaeger with our own proto types, so that at least at the API level the read and write paths are similar, although with distinct import paths (cloning would need to be automated to stay in sync)These are both pretty bad as they force us to create a whole parallel machinery that is nearly identical to pdata but has one extra public type wrapper.
I would like to get suggestions from the collector maintainers how best to approach this. Happy to prototype.
Proposal
query/trace/v1/trace_service.proto
with a single message (for now - in the future this could be extended to a full service definition if Query SIG comes up with a proposal)ExportResponse
:opentelemetry-collector/pdata/ptrace/ptraceotlp/response.go
Lines 16 to 20 in 2c96088
The text was updated successfully, but these errors were encountered: