provider

package module
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 16 Imported by: 11

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 WithEnableCompression added in v0.2.0

func WithEnableCompression() Option

WithEnableCompression enable gzip transport compression

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 WithMeterProvider added in v0.2.0

func WithMeterProvider(meterProvider *metric.MeterProvider) Option

WithMeterProvider configures MeterProvider

func WithResource

func WithResource(resource *resource.Resource) Option

WithResource configures resource

func WithResourceAttribute added in v0.2.0

func WithResourceAttribute(rAttr attribute.KeyValue) Option

WithResourceAttribute configures resource attribute.

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 WithSampler added in v0.2.0

func WithSampler(sampler sdktrace.Sampler) Option

WithSampler configures sampler

func WithSdkTracerProvider added in v0.2.0

func WithSdkTracerProvider(sdkTracerProvider *sdktrace.TracerProvider) Option

WithSdkTracerProvider configures sdkTracerProvider

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