open-telemetry / opentelemetry-specification

Specifications for OpenTelemetry
https://opentelemetry.io
Apache License 2.0
3.69k stars 884 forks source link

grpc-trace-bin support for gRPC trace? #639

Closed youngbupark closed 1 month ago

youngbupark commented 4 years ago

Looks like current spec describes only W3C traceparent header for span context propagation for now.

However, Opencensus gRPC spec uses grpc-trace-bin header for spancontext propagation.

Does open-telemetry have a plan to support it?

Oberon00 commented 4 years ago

This requires #437 "Update Binary format in the Specification" (since #426 removed it; it was there before but was "temporarily" removed due to a larger refactoring of both in-process and cross-process context propagation via https://github.com/open-telemetry/oteps/pull/66). However, #437 depends on #577 "Small clean up for Propagators" which turned out to be not so small (has been in review for over a month now).

carlosalberto commented 4 years ago

While Binary is expected to make it (back) into GA, I'm wondering whether we need this specific item too.

Opinion on this @bogdandrutu ?

JamesNK commented 4 years ago

How will grpc-trace-bin work?

  1. Must both traceparent and grpc-trace-bin headers be present on a gRPC HTTP request?
  2. Or is grpc-trace-bin an optional additional for backwards compatibility. Servers check for traceparent, and if it is not present then use grpc-trace-bin? (or the other way around)
  3. Or are gRPC HTTP requests unique that it uses grpc-trace-bin while other HTTP requests use traceparent?

I'd like to understand the motivation here because there is no detail or discussion.

dyladan commented 4 years ago

Must both traceparent and grpc-trace-bin headers be present on a gRPC HTTP request?

grpc-trace-bin is the binary equivalent of the traceparent. They transmit the same data.

Or is grpc-trace-bin an optional additional for backwards compatibility. Servers check for traceparent, and if it is not present then use grpc-trace-bin? (or the other way around)

it is required for compatibility with opencensus (at least in js) because that is what OC used.

Or are gRPC HTTP requests unique that it uses grpc-trace-bin while other HTTP requests use traceparent?

the motivation is simply that gRPC is a binary protocol which can take advantage of the more tightly packed binary format to save some bytes on each request

rakyll commented 3 years ago

I think we also need to have a separate discussion with gRPC to deprecate grpc-trace-bin and switch them to the TraceContext header.

JosemyDuarte commented 2 years ago

Is this still in development? I'm trying to enable distributed tracing from a JS service to a Golang service which communicate via gRPC but it doesn't work as described on @opentelemetry/instrumentation-grpc, could grpc-trace-bin be the reason? If it so, then how it's @opentelemetry/instrumentation-grpc supposed to work if is not sending grpc-trace-bin?

hdost commented 6 months ago

Also an interested party here

trask commented 6 months ago

In Java gRPC Instrumentation, we don't have any special handling for this, which means we (only) use the traceparent header when W3C propagator is used.

austinlparker commented 1 month ago

Is this related to https://github.com/open-telemetry/opentelemetry-specification/issues/437?

jack-berg commented 1 month ago

I believe so. Closing since this is dependent on #437, which was closed for the reasons listed here.