Documentation ¶
Index ¶
- type Option
- func WithDeploymentEnvironment(env string) Option
- func WithEnableCompression() Option
- func WithEnableMetrics(enableMetrics bool) Option
- func WithEnableTracing(enableTracing bool) Option
- func WithExportEndpoint(endpoint string) Option
- func WithHeaders(headers map[string]string) Option
- func WithInsecure() Option
- func WithMeterProvider(meterProvider *metric.MeterProvider) Option
- func WithResource(resource *resource.Resource) Option
- func WithResourceAttribute(rAttr attribute.KeyValue) Option
- func WithResourceAttributes(rAttrs []attribute.KeyValue) Option
- func WithResourceDetector(detector resource.Detector) Option
- func WithSampler(sampler sdktrace.Sampler) Option
- func WithSdkTracerProvider(sdkTracerProvider *sdktrace.TracerProvider) Option
- func WithServiceName(serviceName string) Option
- func WithServiceNamespace(namespace string) Option
- func WithTextMapPropagator(p propagation.TextMapPropagator) Option
- type OtelProvider
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 ¶
WithDeploymentEnvironment configures `deployment.environment` resource attribute
func WithEnableCompression ¶
func WithEnableCompression() Option
WithEnableCompression enable gzip transport compression
func WithEnableMetrics ¶
WithEnableMetrics enable metrics
func WithEnableTracing ¶
WithEnableTracing enable tracing
func WithExportEndpoint ¶
WithExportEndpoint configures export endpoint
func WithHeaders ¶
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 ¶
func WithMeterProvider(meterProvider *metric.MeterProvider) Option
WithMeterProvider configures MeterProvider
func WithResource ¶
WithResource configures resource
func WithResourceAttribute ¶
WithResourceAttribute configures resource attribute.
func WithResourceAttributes ¶
WithResourceAttributes configures resource attributes.
func WithResourceDetector ¶
WithResourceDetector configures resource detector
func WithSdkTracerProvider ¶
func WithSdkTracerProvider(sdkTracerProvider *sdktrace.TracerProvider) Option
WithSdkTracerProvider configures sdkTracerProvider
func WithServiceName ¶
WithServiceName configures `service.name` resource attribute
func WithServiceNamespace ¶
WithServiceNamespace configures `service.namespace` resource attribute
func WithTextMapPropagator ¶
func WithTextMapPropagator(p propagation.TextMapPropagator) Option
WithTextMapPropagator configures propagation
type OtelProvider ¶
func NewOpenTelemetryProvider ¶
func NewOpenTelemetryProvider(opts ...Option) OtelProvider
NewOpenTelemetryProvider Initializes an otlp trace and metrics provider