Documentation ¶
Index ¶
- type Option
- func WithDeploymentEnvironment(env string) 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 WithResource(resource *resource.Resource) Option
- func WithResourceAttributes(rAttrs []attribute.KeyValue) Option
- func WithResourceDetector(detector resource.Detector) 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 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 WithResource ¶
WithResource configures resource
func WithResourceAttributes ¶
WithResourceAttributes configures resource attributes.
func WithResourceDetector ¶
WithResourceDetector configures resource detector
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