Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OTLPOption ¶
func WithOTLPDialOption ¶
func WithOTLPDialOption(opts ...grpc.DialOption) OTLPOption
WithOTLPDialOption opens support to any grpc.DialOption to be used. If it conflicts with some other configuration the GRPC specified via the collector the ones here will take preference since they are set last.
func WithOTLPEndpoint ¶
func WithOTLPEndpoint(endpoint string) OTLPOption
WithOTLPEndpoint allows one to set the endpoint that the exporter will connect to the collector on. If unset, it will instead try to use connect to DefaultCollectorHost:DefaultCollectorPort.
func WithOTLPHeaders ¶
func WithOTLPHeaders(headers map[string]string) OTLPOption
WithOTLPHeaders will send the provided headers with gRPC requests
func WithOTLPInsecure ¶
func WithOTLPInsecure() OTLPOption
WithOTLPInsecure disables client transport security for the exporter's gRPC connection just like grpc.WithInsecure() https://pkg.go.dev/google.golang.org/grpc#WithInsecure does. Note, by default, client security is required unless WithInsecure is used.
func WithOTLPTLSCredentials ¶
func WithOTLPTLSCredentials(creds credentials.TransportCredentials) OTLPOption
WithOTLPTLSCredentials allows the connection to use TLS credentials when talking to the server. It takes in grpc.TransportCredentials instead of say a Certificate file or a tls.Certificate, because the retrieving these credentials can be done in many ways e.g. plain file, in code tls.Config or by certificate rotation, so it is up to the caller to decide what to use.
type Option ¶
type Option func(*options)
Option sets the value of an option for a Config.
func WithOTLP ¶
func WithOTLP(opts ...OTLPOption) Option
WithOTLP sets the gRPC OTLP exporter for spans.
func WithPrinter ¶
WithPrinter sets the printing exporter for spans.
func WithStartedSpanExporter ¶
func WithStartedSpanExporter(e SpanExporter) Option
WithStartedSpanExporter sets the exporter for spans. Use WithOTLP or WithPrettyPrinter for simpler options.
func WithSvcName ¶
WithSvcName sets service name. Usually it comes in format of service:app.
type Provider ¶
type Provider struct { trace.TracerProvider propagation.TextMapPropagator }
type Sampler ¶
func TraceIDRatioBasedSampler ¶
TraceIDRatioBasedSampler samples a given fraction of traces. Fractions >= 1 will always sample. Fractions < 0 are treated as zero. To respect the parent trace's `SampledFlag`, the `TraceIDRatioBased` sampler should be used as a delegate of a `Parent` sampler.
type SpanExporter ¶
type SpanExporter = etrace.SpanExporter
type SpanOption ¶
type SpanOption = trace.SpanOption