semconv

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 3 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package semconv provides OpenTelemetry attribute keys and constructors for keel specific semantic conventions.

Each attribute is exposed as a go.opentelemetry.io/otel/attribute.Key constant (for example KeelServiceNameKey) and a constructor returning a go.opentelemetry.io/otel/attribute.KeyValue (for example KeelServiceName). Attributes cover keel services, jobs, closers, circuit breakers, RBAC, streams, debug state and generic values (name, value, duration, trace and span ids) that replace the legacy log fields. Use them with log.Attribute and log.Attributes to share keys between logs, metrics and traces. Prefer upstream go.opentelemetry.io/otel/semconv keys where they exist.

Index

Constants

View Source
const (
	// CircuitBreakerPreviousStateKey is the key for circuit_breaker.previous_state.
	CircuitBreakerPreviousStateKey = attribute.Key("circuit_breaker.previous_state")
	// CircuitBreakerStateChangeKey is the key for circuit_breaker.state_change.
	CircuitBreakerStateChangeKey = attribute.Key("circuit_breaker.state_change")
)
View Source
const (
	// NameKey is the key for name.
	NameKey = attribute.Key("name")
	// ValueKey is the key for value.
	ValueKey = attribute.Key("value")
	// NumKey is the key for num.
	NumKey = attribute.Key("num")
	// DurationKey is the key for duration, in seconds.
	DurationKey = attribute.Key("duration")
	// MaxDurationKey is the key for max_duration, in seconds.
	MaxDurationKey = attribute.Key("max_duration")
	// TraceIDKey is the key for trace.id.
	TraceIDKey = attribute.Key("trace.id")
	// SpanIDKey is the key for span.id.
	SpanIDKey = attribute.Key("span.id")
	// ContextErrorKey is the key for context.error.
	ContextErrorKey = attribute.Key("context.error")
)
View Source
const (
	// KeelServiceTypeKey is the key for keel.service.type.
	KeelServiceTypeKey = attribute.Key("keel.service.type")
	// KeelServiceNameKey is the key for keel.service.name.
	KeelServiceNameKey = attribute.Key("keel.service.name")
	// KeelServiceInstKey is the key for keel.service.inst.
	KeelServiceInstKey = attribute.Key("keel.service.inst")
	// KeelGracefulPeriodKey is the key for keel.graceful_period, in seconds.
	KeelGracefulPeriodKey = attribute.Key("keel.graceful_period")
	// KeelJobStepKey is the key for keel.job.step.
	KeelJobStepKey = attribute.Key("keel.job.step")
	// KeelCloserTypeKey is the key for keel.closer.type.
	KeelCloserTypeKey = attribute.Key("keel.closer.type")
	// KeelHealthzProbeTypeKey is the key for keel.healthz.probe.type.
	KeelHealthzProbeTypeKey = attribute.Key("keel.healthz.probe.type")
)
View Source
const (
	// KeelRBACOutcomeKey is the key for keel.rbac.outcome.
	KeelRBACOutcomeKey = attribute.Key("keel.rbac.outcome")
	// KeelRBACAuthenticatedKey is the key for keel.rbac.authenticated.
	KeelRBACAuthenticatedKey = attribute.Key("keel.rbac.authenticated")
	// KeelRBACRolesKey is the key for keel.rbac.roles.
	KeelRBACRolesKey = attribute.Key("keel.rbac.roles")
	// KeelRBACRulePathKey is the key for keel.rbac.rule.path.
	KeelRBACRulePathKey = attribute.Key("keel.rbac.rule.path")
)
View Source
const (
	// DebugEnabledKey is the key for debug.enabled.
	//
	// Deprecated: use foomosemconv.SpanSamplingPriorityKey.
	DebugEnabledKey = attribute.Key("debug.enabled")
)

Variables

This section is empty.

Functions

func ContextError added in v0.33.0

func ContextError(err error) attribute.KeyValue

ContextError returns a new attribute.KeyValue for context.error with the message of the given context error.

func DebugEnabled deprecated added in v0.30.0

func DebugEnabled(v bool) attribute.KeyValue

DebugEnabled returns a new attribute.KeyValue for debug.enabled.

Deprecated: use foomosemconv.SetSpanSamplingPriority.

func Duration added in v0.33.0

func Duration(v time.Duration) attribute.KeyValue

Duration returns a new attribute.KeyValue for duration in seconds.

func KeelCircuitBreakerPreviousState added in v0.33.0

func KeelCircuitBreakerPreviousState(v string) attribute.KeyValue

KeelCircuitBreakerPreviousState returns a new attribute.KeyValue for circuit_breaker.previous_state.

func KeelCircuitBreakerStateChange added in v0.33.0

func KeelCircuitBreakerStateChange(v bool) attribute.KeyValue

KeelCircuitBreakerStateChange returns a new attribute.KeyValue for circuit_breaker.state_change.

func KeelCloserType added in v0.33.0

func KeelCloserType(closer any) attribute.KeyValue

KeelCloserType returns a new attribute.KeyValue for keel.closer.type with the Go type name of closer.

func KeelGracefulPeriod added in v0.33.0

func KeelGracefulPeriod(v time.Duration) attribute.KeyValue

KeelGracefulPeriod returns a new attribute.KeyValue for keel.graceful_period in seconds.

func KeelHealthzProbeType added in v0.33.0

func KeelHealthzProbeType(probe any) attribute.KeyValue

KeelHealthzProbeType returns a new attribute.KeyValue for keel.healthz.probe.type with the Go type name of probe.

func KeelJobStep added in v0.33.0

func KeelJobStep(v string) attribute.KeyValue

KeelJobStep returns a new attribute.KeyValue for keel.job.step.

func KeelRBACAuthenticated added in v0.33.0

func KeelRBACAuthenticated(v bool) attribute.KeyValue

KeelRBACAuthenticated returns a new attribute.KeyValue for keel.rbac.authenticated.

func KeelRBACOutcome added in v0.33.0

func KeelRBACOutcome(v string) attribute.KeyValue

KeelRBACOutcome returns a new attribute.KeyValue for keel.rbac.outcome.

func KeelRBACRoles added in v0.33.0

func KeelRBACRoles(v []string) attribute.KeyValue

KeelRBACRoles returns a new attribute.KeyValue for keel.rbac.roles.

func KeelRBACRulePath added in v0.33.0

func KeelRBACRulePath(v string) attribute.KeyValue

KeelRBACRulePath returns a new attribute.KeyValue for keel.rbac.rule.path.

func KeelServiceInst

func KeelServiceInst(v int) attribute.KeyValue

KeelServiceInst returns a new attribute.KeyValue for keel.service.inst.

func KeelServiceName

func KeelServiceName(v string) attribute.KeyValue

KeelServiceName returns a new attribute.KeyValue for keel.service.name.

func KeelServiceType

func KeelServiceType(v KeelServiceTypeAttr) attribute.KeyValue

KeelServiceType returns a new attribute.KeyValue for keel.service.type.

func MaxDuration added in v0.33.0

func MaxDuration(v time.Duration) attribute.KeyValue

MaxDuration returns a new attribute.KeyValue for max_duration in seconds.

func Name added in v0.33.0

func Name(v string) attribute.KeyValue

Name returns a new attribute.KeyValue for name.

func Num added in v0.33.0

func Num(v int) attribute.KeyValue

Num returns a new attribute.KeyValue for num.

func SpanID added in v0.22.1

func SpanID(v string) attribute.KeyValue

SpanID returns a new attribute.KeyValue for span.id.

func TraceID added in v0.22.1

func TraceID(v string) attribute.KeyValue

TraceID returns a new attribute.KeyValue for trace.id.

func Value added in v0.33.0

func Value(v any) attribute.KeyValue

Value returns a new attribute.KeyValue for value with v formatted by %v.

Types

type KeelServiceTypeAttr added in v0.33.0

type KeelServiceTypeAttr string

KeelServiceTypeAttr is an enum value of keel.service.type.

const (
	// KeelServiceTypeHTTP is the keel.service.type of an HTTP service.
	KeelServiceTypeHTTP KeelServiceTypeAttr = "http"
	// KeelServiceTypeGoRoutine is the keel.service.type of a goroutine service.
	KeelServiceTypeGoRoutine KeelServiceTypeAttr = "goroutine"
	// KeelServiceTypeSubscription is the keel.service.type of a subscription service.
	KeelServiceTypeSubscription KeelServiceTypeAttr = "sub"
	// KeelServiceTypeJob is the keel.service.type of a job.
	KeelServiceTypeJob KeelServiceTypeAttr = "job"
)

Jump to

Keyboard shortcuts

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