telemetry

package
v0.42.0 Latest Latest
Warning

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

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

Documentation

Overview

Package telemetry contains opt-in runtime telemetry setup helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RedactTelemetryValue

func RedactTelemetryValue(input string) string

Types

type EnvLookup

type EnvLookup func(string) (string, bool)

type OTelConfig

type OTelConfig struct {
	ServiceName        string
	ServiceVersion     string
	Environment        string
	RunID              string
	TenantDeploymentID string
	StackKit           string
	Provider           string
	NodeID             string
}

type OTelRuntime

type OTelRuntime struct {
	Enabled            bool
	Endpoint           string
	Protocol           string
	Headers            map[string]string
	ServiceName        string
	ServiceVersion     string
	Environment        string
	RunID              string
	TenantDeploymentID string
	StackKit           string
	Provider           string
	NodeID             string
	ResourceAttributes map[string]string
}

func ResolveOTelRuntime

func ResolveOTelRuntime(cfg OTelConfig, lookup EnvLookup) OTelRuntime

func SetupOTel

func SetupOTel(ctx context.Context, cfg OTelConfig) (OTelRuntime, func(context.Context) error, error)

func SetupOTelWithLookup

func SetupOTelWithLookup(ctx context.Context, cfg OTelConfig, lookup EnvLookup) (OTelRuntime, func(context.Context) error, error)

type SentryCaptureOptions

type SentryCaptureOptions struct {
	Transport    sentry.Transport
	FlushTimeout time.Duration
}

type SentryConfig

type SentryConfig struct {
	DSN                string
	Environment        string
	Release            string
	RunID              string
	TenantDeploymentID string
	StackKit           string
	Phase              string
	FailureClass       string
	Provider           string
	RolloutMode        string
	Tags               map[string]string
}

type SentryFailureEvent

type SentryFailureEvent struct {
	EventID         string            `json:"eventId"`
	SentryEventID   string            `json:"sentryEventId,omitempty"`
	SentryDelivered bool              `json:"sentryDelivered"`
	CapturedAt      time.Time         `json:"capturedAt"`
	Status          string            `json:"status"`
	Message         string            `json:"message"`
	Environment     string            `json:"environment,omitempty"`
	Release         string            `json:"release,omitempty"`
	Tags            map[string]string `json:"tags,omitempty"`
	Issues          []string          `json:"issues,omitempty"`
	Redaction       string            `json:"redaction"`
	DeliveryMode    string            `json:"deliveryMode"`
}

type SentryRuntime

type SentryRuntime struct {
	Enabled            bool
	DSN                string
	Environment        string
	Release            string
	ForbiddenAuthToken bool
	Tags               map[string]string
	Issues             []string
}

func CaptureSentryFailure

func CaptureSentryFailure(root string, cfg SentryConfig, message string, lookup EnvLookup) (string, SentryRuntime, error)

func CaptureSentryFailureWithOptions

func CaptureSentryFailureWithOptions(root string, cfg SentryConfig, message string, lookup EnvLookup, options SentryCaptureOptions) (string, SentryRuntime, error)

func ResolveSentryRuntime

func ResolveSentryRuntime(cfg SentryConfig, lookup EnvLookup) SentryRuntime

type SpanHandle

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

func StartSpan

func StartSpan(ctx context.Context, name string, attrs map[string]string) (context.Context, SpanHandle)

func (SpanHandle) AddEvent

func (h SpanHandle) AddEvent(name string, attrs map[string]string)

func (SpanHandle) End

func (h SpanHandle) End()

func (SpanHandle) IsRecording

func (h SpanHandle) IsRecording() bool

func (SpanHandle) RecordError

func (h SpanHandle) RecordError(err error)

func (SpanHandle) SetAttributes

func (h SpanHandle) SetAttributes(attrs map[string]string)

func (SpanHandle) SetRolloutStatus

func (h SpanHandle) SetRolloutStatus(status, description string)

Jump to

Keyboard shortcuts

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