telemetry

package
v1.8.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package telemetry provides a simple way to set up OpenTelemetry SDK.

nolint: ireturn

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupOTELSDK

func SetupOTELSDK(
	ctx context.Context,
	opts ...Option,
) (
	shutdown func(context.Context) error,
	err error,
)

SetupOTELSDK sets up the OpenTelemetry SDK.

Types

type Option

type Option func(*options)

Option is a function that configures the OTEL SDK.

func WithMetricExporter

func WithMetricExporter(exporter metric.Exporter) Option

WithMetricExporter sets the metric exporter.

func WithMetricReader

func WithMetricReader(reader metric.Reader) Option

WithMetricReader sets the metric reader.

func WithStdout

func WithStdout() Option

WithStdout sets the exporters to stdout.

func WithTraceExporter

func WithTraceExporter(exporter trace.SpanExporter) Option

WithTraceExporter sets the trace exporter.

Jump to

Keyboard shortcuts

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