provider

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

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

Option opts for opentelemetry tracer provider

func WithDeploymentEnvironment

func WithDeploymentEnvironment(env string) Option

WithDeploymentEnvironment configures `deployment.environment` resource attribute

func WithEnableMetrics

func WithEnableMetrics(enableMetrics bool) Option

WithEnableMetrics enable metrics

func WithEnableTracing

func WithEnableTracing(enableTracing bool) Option

WithEnableTracing enable tracing

func WithExportEndpoint

func WithExportEndpoint(endpoint string) Option

WithExportEndpoint configures export endpoint

func WithHeaders

func WithHeaders(headers map[string]string) Option

WithHeaders configures gRPC requests headers for exported telemetry data

func WithInsecure

func WithInsecure() Option

WithInsecure disables client transport security for the exporter's gRPC

func WithResource

func WithResource(resource *resource.Resource) Option

WithResource configures resource

func WithResourceAttributes

func WithResourceAttributes(rAttrs []attribute.KeyValue) Option

WithResourceAttributes configures resource attributes.

func WithResourceDetector

func WithResourceDetector(detector resource.Detector) Option

WithResourceDetector configures resource detector

func WithServiceName

func WithServiceName(serviceName string) Option

WithServiceName configures `service.name` resource attribute

func WithServiceNamespace

func WithServiceNamespace(namespace string) Option

WithServiceNamespace configures `service.namespace` resource attribute

func WithTextMapPropagator

func WithTextMapPropagator(p propagation.TextMapPropagator) Option

WithTextMapPropagator configures propagation

type OtelProvider

type OtelProvider interface {
	Shutdown(ctx context.Context) error
}

func NewOpenTelemetryProvider

func NewOpenTelemetryProvider(opts ...Option) OtelProvider

NewOpenTelemetryProvider Initializes an otlp trace and metrics provider

Jump to

Keyboard shortcuts

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