internal

package
v0.100.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultErrorMessage = "segment %q from path %q is not a valid path nor a valid OTTL keyword for the %v context - review %v to see all valid paths"

	ResourceContextRef      = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlresource"
	InstrumentationScopeRef = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlscope"
	SpanRef                 = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlspan"
	SpanEventRef            = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlspanevent"
	MetricRef               = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlmetric"
	DataPointRef            = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottldatapoint"
	LogRef                  = "https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottllog"
)
View Source
const (
	SpanContextName = "Span"
)

Variables

View Source
var MetricSymbolTable = map[ottl.EnumSymbol]ottl.Enum{
	"AGGREGATION_TEMPORALITY_UNSPECIFIED":    ottl.Enum(pmetric.AggregationTemporalityUnspecified),
	"AGGREGATION_TEMPORALITY_DELTA":          ottl.Enum(pmetric.AggregationTemporalityDelta),
	"AGGREGATION_TEMPORALITY_CUMULATIVE":     ottl.Enum(pmetric.AggregationTemporalityCumulative),
	"METRIC_DATA_TYPE_NONE":                  ottl.Enum(pmetric.MetricTypeEmpty),
	"METRIC_DATA_TYPE_GAUGE":                 ottl.Enum(pmetric.MetricTypeGauge),
	"METRIC_DATA_TYPE_SUM":                   ottl.Enum(pmetric.MetricTypeSum),
	"METRIC_DATA_TYPE_HISTOGRAM":             ottl.Enum(pmetric.MetricTypeHistogram),
	"METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM": ottl.Enum(pmetric.MetricTypeExponentialHistogram),
	"METRIC_DATA_TYPE_SUMMARY":               ottl.Enum(pmetric.MetricTypeSummary),
}
View Source
var SpanSymbolTable = map[ottl.EnumSymbol]ottl.Enum{
	"SPAN_KIND_UNSPECIFIED": ottl.Enum(ptrace.SpanKindUnspecified),
	"SPAN_KIND_INTERNAL":    ottl.Enum(ptrace.SpanKindInternal),
	"SPAN_KIND_SERVER":      ottl.Enum(ptrace.SpanKindServer),
	"SPAN_KIND_CLIENT":      ottl.Enum(ptrace.SpanKindClient),
	"SPAN_KIND_PRODUCER":    ottl.Enum(ptrace.SpanKindProducer),
	"SPAN_KIND_CONSUMER":    ottl.Enum(ptrace.SpanKindConsumer),
	"STATUS_CODE_UNSET":     ottl.Enum(ptrace.StatusCodeUnset),
	"STATUS_CODE_OK":        ottl.Enum(ptrace.StatusCodeOk),
	"STATUS_CODE_ERROR":     ottl.Enum(ptrace.StatusCodeError),
}

Functions

func FormatDefaultErrorMessage added in v0.96.0

func FormatDefaultErrorMessage(pathSegment, fullPath, context, ref string) error

func GetMapValue added in v0.77.0

func GetMapValue[K any](ctx context.Context, tCtx K, m pcommon.Map, keys []ottl.Key[K]) (any, error)

func GetSliceValue added in v0.79.0

func GetSliceValue[K any](ctx context.Context, tCtx K, s pcommon.Slice, keys []ottl.Key[K]) (any, error)

func MetricPathGetSetter

func MetricPathGetSetter[K MetricContext](path ottl.Path[K]) (ottl.GetSetter[K], error)

func ParseSpanID

func ParseSpanID(spanIDStr string) (pcommon.SpanID, error)

func ParseTraceID

func ParseTraceID(traceIDStr string) (pcommon.TraceID, error)

func ResourcePathGetSetter

func ResourcePathGetSetter[K ResourceContext](path ottl.Path[K]) (ottl.GetSetter[K], error)

func ScopePathGetSetter

func ScopePathGetSetter[K InstrumentationScopeContext](path ottl.Path[K]) (ottl.GetSetter[K], error)

func SetMapValue added in v0.77.0

func SetMapValue[K any](ctx context.Context, tCtx K, m pcommon.Map, keys []ottl.Key[K], val any) error

func SetSliceValue added in v0.79.0

func SetSliceValue[K any](ctx context.Context, tCtx K, s pcommon.Slice, keys []ottl.Key[K], val any) error

func SetValue added in v0.77.0

func SetValue(value pcommon.Value, val any) error

func SpanPathGetSetter

func SpanPathGetSetter[K SpanContext](path ottl.Path[K]) (ottl.GetSetter[K], error)

Types

type InstrumentationScopeContext

type InstrumentationScopeContext interface {
	GetInstrumentationScope() pcommon.InstrumentationScope
}

type MetricContext

type MetricContext interface {
	GetMetric() pmetric.Metric
}

type ResourceContext

type ResourceContext interface {
	GetResource() pcommon.Resource
}

type SpanContext

type SpanContext interface {
	GetSpan() ptrace.Span
}

type TestKey added in v0.92.0

type TestKey[K any] struct {
	S *string
	I *int64
}

func (*TestKey[K]) Int added in v0.92.0

func (k *TestKey[K]) Int(_ context.Context, _ K) (*int64, error)

func (*TestKey[K]) String added in v0.92.0

func (k *TestKey[K]) String(_ context.Context, _ K) (*string, error)

type TestPath added in v0.92.0

type TestPath[K any] struct {
	N        string
	KeySlice []ottl.Key[K]
	NextPath *TestPath[K]
}

func (*TestPath[K]) Keys added in v0.92.0

func (p *TestPath[K]) Keys() []ottl.Key[K]

func (*TestPath[K]) Name added in v0.92.0

func (p *TestPath[K]) Name() string

func (*TestPath[K]) Next added in v0.92.0

func (p *TestPath[K]) Next() ottl.Path[K]

func (*TestPath[K]) String added in v0.96.0

func (p *TestPath[K]) String() string

Jump to

Keyboard shortcuts

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