tracing

package
v0.49.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	EnvOTLPEndpoint       = "OTEL_EXPORTER_OTLP_ENDPOINT"
	EnvOTLPProtocol       = "OTEL_EXPORTER_OTLP_PROTOCOL"
	EnvOTLPTracesProtocol = "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL"
	EnvTracesSampler      = "OTEL_TRACES_SAMPLER"
	EnvTracesSamplerArg   = "OTEL_TRACES_SAMPLER_ARG"
)
View Source
const (
	SpanWaitDuration    = "waitDuration"
	SpanExecuteDuration = "executeDuration"
)
View Source
const AttrNamespace = "delivery.tekton.dev"
View Source
const MaxResultMessageLen = 1024
View Source
const TracerName = "pipelines-as-code"

Variables

View Source
var (
	NamespaceKey   = attribute.Key("namespace")
	PipelineRunKey = attribute.Key("pipelinerun")

	DeliveryApplicationKey    = attribute.Key(AttrNamespace + ".application")
	DeliveryComponentKey      = attribute.Key(AttrNamespace + ".component")
	DeliveryResultMessageKey  = attribute.Key(AttrNamespace + ".result_message")
	DeliveryPipelineRunUIDKey = attribute.Key(AttrNamespace + ".pipelinerun_uid")

	PACEventTypeKey = attribute.Key(pipelinesascode.GroupName + ".event_type")
)

See docs/content/docs/operations/tracing.md for the full attribute schema.

Functions

func ResultEnum

func ResultEnum(cond *apis.Condition) attribute.KeyValue

ResultEnum maps a PipelineRun Succeeded condition to a semconv cicd.pipeline.result enum value. Unknown reasons fall back to CICDPipelineResultError so that forward-compatible Tekton reasons are never silently dropped.

func TruncateResultMessage

func TruncateResultMessage(msg string) string

TruncateResultMessage caps msg at MaxResultMessageLen bytes, appending a marker when truncation occurs. The cut is walked back to a UTF-8 rune boundary so the result is always valid UTF-8.

Types

type TracerProvider added in v0.49.0

type TracerProvider struct {
	// contains filtered or unexported fields
}

func New added in v0.49.0

func New(logger *zap.SugaredLogger) *TracerProvider

func (*TracerProvider) Shutdown added in v0.49.0

func (tp *TracerProvider) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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