oteltracehttp

package
v0.0.0-...-98cd694 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Unlicense Imports: 11 Imported by: 0

Documentation

Overview

Package oteltracehttp provides common functions for attaching values to trace spans

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupOtelHTTP

func SetupOtelHTTP(ctx context.Context, c *Config) (tracing.TracerProvider, error)

SetupOtelHTTP creates a new trace provider instance and registers it as global trace provider.

Types

type Config

type Config struct {
	CollectorEndpoint         string  `json:"collector_endpoint,omitempty"        toml:"collector_endpoint,omitempty"`
	ServiceName               string  `json:"service_name,omitempty"              toml:"service_name,omitempty"`
	SpanCollectionProbability float64 `json:"spanCollectionProbability,omitempty" toml:"span_collection_probability,omitempty"`
	// contains filtered or unexported fields
}

Config contains settings related to tracing.

func (*Config) ValidateWithContext

func (c *Config) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates the config struct.

Jump to

Keyboard shortcuts

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