otlp

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: Apache-2.0 Imports: 8 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 AnyValueToString added in v1.5.0

func AnyValueToString(v *dash0api.AnyValue) string

AnyValueToString converts an AnyValue to its string representation.

func DefaultScopeVersion

func DefaultScopeVersion() string

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

func DerefHexBytes added in v1.5.0

func DerefHexBytes(b *[]byte) string

DerefHexBytes returns the hex encoding of a *[]byte, or "" if nil.

func DerefInt64 added in v1.5.0

func DerefInt64(i *int64) string

DerefInt64 returns the string representation of a *int64, or "" if nil.

func DerefString added in v1.5.0

func DerefString(s *string) string

DerefString returns the value of a *string, or "" if nil.

func FindAttribute added in v1.5.0

func FindAttribute(attrs []dash0api.KeyValue, key string) string

FindAttribute looks up key in attrs and returns its string representation. Returns "" if the key is not found or the value is empty.

func MergeAttributes added in v1.5.0

func MergeAttributes(attrSlices ...[]dash0api.KeyValue) []dash0api.KeyValue

MergeAttributes merges multiple attribute slices into a single slice. Later slices take precedence over earlier ones for duplicate keys.

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