Documentation ¶
Overview ¶
Package transform provides translations for opentelemetry-go concepts and structures to otlp structures.
Index ¶
- Variables
- func Attributes(attrs []label.KeyValue) []*commonpb.KeyValue
- func CheckpointSet(ctx context.Context, exportSelector export.ExportKindSelector, ...) ([]*metricpb.ResourceMetrics, error)
- func Record(r export.Record) (*metricpb.Metric, error)
- func Resource(r *resource.Resource) *resourcepb.Resource
- func ResourceAttributes(resource *resource.Resource) []*commonpb.KeyValue
- func SpanData(sdl []*export.SpanData) []*tracepb.ResourceSpans
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnimplementedAgg is returned when a transformation of an unimplemented // aggregator is attempted. ErrUnimplementedAgg = errors.New("unimplemented aggregator") // ErrUnknownValueType is returned when a transformation of an unknown value // is attempted. ErrUnknownValueType = errors.New("invalid value type") // ErrContextCanceled is returned when a context cancellation halts a // transformation. ErrContextCanceled = errors.New("context canceled") // ErrTransforming is returned when an unexected error is encoutered transforming. ErrTransforming = errors.New("transforming failed") )
Functions ¶
func Attributes ¶ added in v0.4.0
Attributes transforms a slice of KeyValues into a slice of OTLP attribute key-values.
func CheckpointSet ¶ added in v0.4.3
func CheckpointSet(ctx context.Context, exportSelector export.ExportKindSelector, cps export.CheckpointSet, numWorkers uint) ([]*metricpb.ResourceMetrics, error)
CheckpointSet transforms all records contained in a checkpoint into batched OTLP ResourceMetrics.
func Record ¶
Record transforms a Record into an OTLP Metric. An ErrUnimplementedAgg error is returned if the Record Aggregator is not supported.
func Resource ¶ added in v0.4.0
func Resource(r *resource.Resource) *resourcepb.Resource
Resource transforms a Resource into an OTLP Resource.
func ResourceAttributes ¶ added in v0.4.3
ResourceAttributes transforms a Resource into a slice of OTLP attribute key-values.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.