ottlspanevent

package
v0.67.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 8 Imported by: 6

README

Span Event Context

The Span Event Context is a Context implementation for pdata SpanEvents, the Collector's internal representation for OTLP Span Event data. This Context should be used when interacting with individual OTLP Span Events.

Paths

In general, the Span Event Context supports accessing pdata using the field names from the traces proto. All integers are returned and set via int64. All doubles are returned and set via float64.

The following fields are the exception.

path field accessed type
resource resource of the span event being processed pcommon.Resource
resource.attributes resource attributes of the span event being processed pcommon.Map
resource.attributes[""] the value of the resource attribute of the span event being processed string, bool, int64, float64, pcommon.Map, pcommon.Slice, []byte or nil
instrumentation_scope instrumentation scope of the span event being processed pcommon.InstrumentationScope
instrumentation_scope.name name of the instrumentation scope of the span event being processed string
instrumentation_scope.version version of the instrumentation scope of the span event being processed string
instrumentation_scope.attributes instrumentation scope attributes of the span event being processed pcommon.Map
instrumentation_scope.attributes[""] the value of the instrumentation scope attribute of the span event being processed string, bool, int64, float64, pcommon.Map, pcommon.Slice, []byte or nil
span span of the span event being processed ptrace.Span
span.* All fields exposed by the ottltraces context can accessed via span. varies
attributes attributes of the span event being processed pcommon.Map
attributes[""] the value of the attribute of the span event being processed string, bool, int64, float64, pcommon.Map, pcommon.Slice, []byte or nil

Enums

The Span Event Context supports the enum names from the traces proto.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewParser

func NewParser(functions map[string]interface{}, telemetrySettings component.TelemetrySettings) ottl.Parser[TransformContext]

Types

type TransformContext

type TransformContext struct {
	// contains filtered or unexported fields
}

func NewTransformContext

func NewTransformContext(spanEvent ptrace.SpanEvent, span ptrace.Span, instrumentationScope pcommon.InstrumentationScope, resource pcommon.Resource) TransformContext

func (TransformContext) GetInstrumentationScope

func (tCtx TransformContext) GetInstrumentationScope() pcommon.InstrumentationScope

func (TransformContext) GetResource

func (tCtx TransformContext) GetResource() pcommon.Resource

func (TransformContext) GetSpan

func (tCtx TransformContext) GetSpan() ptrace.Span

func (TransformContext) GetSpanEvent

func (tCtx TransformContext) GetSpanEvent() ptrace.SpanEvent

Jump to

Keyboard shortcuts

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