ottlscope

package
v0.116.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 4

README

Instrumentation Scope Context

The Instrumentation Scope Context is a Context implementation for pdata Instrumentation Scope, the Collector's internal representation for OTLP instrumentation scope data. This Context should be used when interacting only with OTLP instrumentation scope.

Paths

In general, the Instrumentation Scope Context supports accessing pdata using the field names from the instrumentation section in the common proto. All integers are returned and set via int64. All doubles are returned and set via float64.

The following paths are supported.

path field accessed type
cache the value of the current transform context's temporary cache. cache can be used as a temporary placeholder for data during complex transformations pcommon.Map
cache[""] the value of an item in cache. Supports multiple indexes to access nested fields. string, bool, int64, float64, pcommon.Map, pcommon.Slice, []byte or nil
resource resource of the instrumentation scope being processed pcommon.Resource
resource.attributes resource attributes of the instrumentation scope being processed pcommon.Map
resource.attributes[""] the value of the resource attribute of the instrumentation scope being processed. Supports multiple indexes to access nested fields. string, bool, int64, float64, pcommon.Map, pcommon.Slice, []byte or nil
resource.dropped_attributes_count number of dropped attributes of the resource of the instrumentation scope being processed int64
name name of the instrumentation scope of the scope being processed string
version version of the instrumentation scope of the scope being processed string
dropped_attributes_count number of dropped attributes of the instrumentation scope of the scope being processed int64
attributes instrumentation scope attributes of the scope being processed pcommon.Map
attributes[""] the value of the instrumentation scope attribute of the scope being processed. Supports multiple indexes to access nested fields. string, bool, int64, float64, pcommon.Map, pcommon.Slice, []byte or nil

Enums

The Instrumentation Scope Context does not define any Enums at this time.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConditionSequence added in v0.91.0

func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext]

func NewParser

func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error)

func NewStatementSequence added in v0.91.0

func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext]

Types

type ConditionSequenceOption added in v0.91.0

type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext])

func WithConditionSequenceErrorMode added in v0.91.0

func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption

type Option added in v0.70.0

type Option func(*ottl.Parser[TransformContext])

type StatementSequenceOption added in v0.91.0

type StatementSequenceOption func(*ottl.StatementSequence[TransformContext])

func WithStatementSequenceErrorMode added in v0.91.0

func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption

type TransformContext

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

func NewTransformContext

func NewTransformContext(instrumentationScope pcommon.InstrumentationScope, resource pcommon.Resource, schemaURLItem internal.SchemaURLItem) TransformContext

func (TransformContext) GetInstrumentationScope

func (tCtx TransformContext) GetInstrumentationScope() pcommon.InstrumentationScope

func (TransformContext) GetResource

func (tCtx TransformContext) GetResource() pcommon.Resource

func (TransformContext) GetResourceSchemaURLItem added in v0.104.0

func (tCtx TransformContext) GetResourceSchemaURLItem() internal.SchemaURLItem

func (TransformContext) GetScopeSchemaURLItem added in v0.104.0

func (tCtx TransformContext) GetScopeSchemaURLItem() internal.SchemaURLItem

func (TransformContext) MarshalLogObject added in v0.103.0

func (tCtx TransformContext) MarshalLogObject(encoder zapcore.ObjectEncoder) error

Jump to

Keyboard shortcuts

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