otlpingest

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package otlpingest decodes OTLP/HTTP trace exports into stored spans.

Index

Constants

View Source
const MaxSpansPerRequest = 5000

MaxSpansPerRequest bounds one export, so a single request cannot be an unbounded write.

Variables

View Source
var ErrNoValidSpans = errors.New("otlp: no span had a 16 byte trace id and an 8 byte span id")

ErrNoValidSpans is returned when an export held spans but none had valid ids, so the sender learns its ids are malformed instead of seeing success.

View Source
var ErrUnsupportedType = errors.New("otlp: content type must be application/x-protobuf or application/json")

ErrUnsupportedType is returned for a content type that is neither OTLP protobuf nor OTLP JSON.

Functions

func DecodeTraces

func DecodeTraces(contentType string, body []byte, resourceID string) ([]telemetry.Span, error)

DecodeTraces parses one export request and returns its spans stamped with resourceID. The sender's own service.name is kept as an attribute but never decides which app the spans belong to.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL