otlp

package
v0.0.0-...-abdf862 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exporter

func Exporter(endpoint string, opts ...Option) tracing.ExporterBuilder

Exporter sets the gRPC OTLP exporter builder that builds exporter for spans that can be used in tracing.WithExporter(). Endpoint is in form of host:port.

Types

type Option

type Option struct {
	// contains filtered or unexported fields
}

Option represents gRPC OTLP exporter option.

func WithDialOption

func WithDialOption(opts ...grpc.DialOption) Option

WithDialOption 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 WithHeaders

func WithHeaders(headers map[string]string) Option

WithHeaders will send the provided headers with gRPC requests/

func WithInsecure

func WithInsecure() Option

WithInsecure 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 WithTLSCredentials

func WithTLSCredentials(creds credentials.TransportCredentials) Option

WithTLSCredentials 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.

Jump to

Keyboard shortcuts

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