dtotel

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count[N Number](ctx context.Context, meter metric.Meter, name string, value N, attributes ...attribute.KeyValue)

Count is a utility that can be used to increase Int64 and Float64 counters, but with same safeguards to avoid panics, if meter is not properly initialized

func Start

func Start(ctx context.Context, otelServiceName string, apiReader client.Reader, webhookNamespace string) func()

Start sets up and starts all components needed for creating OpenTelemetry traces and metrics as well as some common auto-instrumentation It logs and swallows all errors to not prevent the application from startup.

func StartSpan

func StartSpan[T any](ctx context.Context, tracer T, opts ...trace.SpanStartOption) (context.Context, trace.Span)

Types

type Number

type Number interface {
	int64 | float64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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