silk.trace.otlp.
OTLP/HTTP JSON encoding for recorder batches.
Import as OtlpJson with import silk.trace.otlp as OtlpJson.
Public declarations: 4.
Resource#
pub struct ResourceResource identity and cumulative drops at the time of a flush.
Field serviceName#
pub serviceName: string<'static>The value of the OTel service.name resource attribute.
Field serviceVersion#
pub serviceVersion: string<'static>The optional service.version value. An empty string omits it.
Field droppedSpans#
pub droppedSpans: u64Total spans discarded by this recorder or its destination.
Field droppedLogs#
pub droppedLogs: u64Total log records discarded by this recorder or its destination.
Field droppedMetrics#
pub droppedMetrics: u64Total metric updates or data points discarded.
Batch#
pub union Batch<'a>A borrowed batch for a single OTLP signal.
Spans#
SpansCompleted spans, each carrying its instrumentation scope.
Field values#
pub values: &'a [Span]Logs#
LogsCompleted log records, with optional span context.
Field values#
pub values: &'a [LogRecord]Metrics#
MetricsCumulative metric snapshots. Set includeDrops on the last batch to report nonzero drop counters at time, in Unix nanoseconds.
Field values#
pub values: &'a [MetricPoint]Field includeDrops#
pub includeDrops: boolField time#
pub time: u64write#
pub effect fn write(identity: &Resource, batch: &Batch<'_>) -> () ! WriterError ? &mut WriterWrites one complete OTLP export request, including its resource and instrumentation scopes.
encode#
pub effect fn encode(identity: &Resource, batch: &Batch<'_>) -> Bytes ! WriterError | OutOfMemoryError ? &mut AllocatorReturns the complete request bytes for an OTLP/HTTP retry or a length-prefixed write.
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc, wasm64-unknown-unknown.