telemetry

package
v1.8.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 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.

Directories

Path Synopsis
Package metrics provides a way to record metrics.
Package metrics provides a way to record metrics.

Jump to

Keyboard shortcuts

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