telemetry

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateExporter

func CreateExporter(cfg configmodels.Telemetry) (exporter tracesdk.SpanExporter, err error)

CreateExporter returns an exporter based on the configmodels data.

func NewTraceProvider

func NewTraceProvider(
	ctx context.Context,
	cfg configmodels.Telemetry,
	attributes ...attribute.KeyValue,
) (*tracesdk.TracerProvider, error)

NewTraceProvider creates the actual exporter based on the config, certain options are only supported with an insecure option, if you have a pre-defined exporter use SetupTelemetryProvider instead.

func SetupTelemetryProvider

func SetupTelemetryProvider(
	ctx context.Context,
	exporter tracesdk.SpanExporter,
	attributes ...attribute.KeyValue,
) (*tracesdk.TracerProvider, error)

SetupTelemetryProvider creates a telemetry provider with the following resources FromEnv, TelemetrySDK, Host(), ProcessExecutablePath(), ProcessOwner(), ProcessPID(), and custom defined attributes passed.

func WithError

func WithError(span trace.Span, err error) error

WithError attempts to record an error to the span, returning the thrown error.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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