otlp

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultScopeName = "dash0-cli"

DefaultScopeName is the default instrumentation scope name used by the CLI.

Variables

This section is empty.

Functions

func DefaultScopeVersion

func DefaultScopeVersion() string

DefaultScopeVersion returns the default scope version (the CLI version).

func ParseKeyValuePairs

func ParseKeyValuePairs(pairs []string) (map[string]string, error)

ParseKeyValuePairs parses a slice of "key=value" strings into a map.

func ParseSpanID

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

ParseSpanID parses a 16 hex character string into a pcommon.SpanID.

func ParseTraceID

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

ParseTraceID parses a 32 hex character string into a pcommon.TraceID.

func ResolveScopeDefaults

func ResolveScopeDefaults(cmd *cobra.Command, scopeName *string, scopeVersion *string)

ResolveScopeDefaults clears the default value for scope-name or scope-version when only the other flag is explicitly set. This avoids pairing a custom scope name with the dash0-cli version (or vice versa).

func SeverityNumberToRange

func SeverityNumberToRange(n int32) string

SeverityNumberToRange maps an OTel severity number (0–24) to its severity range. Numbers outside the defined bands return a formatted string like "SEVERITY_25".

Types

type OtlpLogSeverityRange

type OtlpLogSeverityRange string

OtlpLogSeverityRange represents the OpenTelemetry log severity ranges. Each range covers a band of four severity numbers as defined by the OpenTelemetry specification.

const (
	Unknown OtlpLogSeverityRange = "UNKNOWN"
	Trace   OtlpLogSeverityRange = "TRACE"
	Debug   OtlpLogSeverityRange = "DEBUG"
	Info    OtlpLogSeverityRange = "INFO"
	Warn    OtlpLogSeverityRange = "WARN"
	Error   OtlpLogSeverityRange = "ERROR"
	Fatal   OtlpLogSeverityRange = "FATAL"
)

Jump to

Keyboard shortcuts

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