Skip to main content

encode_traces_request

Function encode_traces_request 

Source
pub fn encode_traces_request(
    service_name: &str,
    spans: &[SpanRecord],
) -> Vec<u8> 
Expand description

Encode one ExportTraceServiceRequest (trace_service.proto: repeated ResourceSpans resource_spans = 1) carrying every span under a single Resource + InstrumentationScope.

Resource identity (semconv): service.name is the operator-visible name; telemetry.sdk.* identifies this hand-written exporter as its own SDK (semconv forbids claiming opentelemetry for a non-official implementation).