Documentation
¶
Index ¶
- Constants
- func DefaultScopeVersion() string
- func ParseKeyValuePairs(pairs []string) (map[string]string, error)
- func ParseSpanID(s string) (pcommon.SpanID, error)
- func ParseTraceID(s string) (pcommon.TraceID, error)
- func ResolveScopeDefaults(cmd *cobra.Command, scopeName *string, scopeVersion *string)
- func SeverityNumberToRange(n int32) string
- type OtlpLogSeverityRange
Constants ¶
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 ¶
ParseKeyValuePairs parses a slice of "key=value" strings into a map.
func ParseSpanID ¶
ParseSpanID parses a 16 hex character string into a pcommon.SpanID.
func ParseTraceID ¶
ParseTraceID parses a 32 hex character string into a pcommon.TraceID.
func ResolveScopeDefaults ¶
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 ¶
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" )