telemetry

package
v1.4.22 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupOTel

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

SetupOTel initializes OpenTelemetry with the provided options.

It sets up the tracer provider and meter provider with the given context and options. Returns a shutdown function that can be used to cleanly terminate all telemetry resources, and an error if any part of the setup failed.

Parameters:

  • ctx: The context used for setting up and potentially canceling telemetry operations
  • opts: Optional configuration parameters for OpenTelemetry setup

Returns:

  • shutdown: A function that properly closes all telemetry resources when called
  • err: An error if any part of the OpenTelemetry setup failed

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithDeploymentEnvironment

func WithDeploymentEnvironment(environment string) Option

func WithServiceName

func WithServiceName(name string) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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