Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTraceExporter ¶
func NewTraceExporter(ctx context.Context, dsn string, opts ...Option) (sdktrace.SpanExporter, error)
NewTraceExporter creates a new SpanExporter that sends spans to Sentry via the OTLP HTTP protocol.
The endpoint, URL path, headers, and HTTP/HTTPS mode are derived from the DSN.
Types ¶
type Option ¶
type Option func(*config)
Option configures safe OTLP HTTP client behavior for the Sentry exporter. Target selection and auth remain derived from the DSN.
func WithCompression ¶
func WithCompression(compression otlptracehttp.Compression) Option
WithCompression configures OTLP payload compression.
func WithProxy ¶ added in v0.49.0
func WithProxy(proxy otlptracehttp.HTTPTransportProxyFunc) Option
WithProxy configures the HTTP proxy function used for OTLP export requests.
If not set, the exporter falls back to [http.ProxyFromEnvironment] (i.e. HTTP_PROXY/HTTPS_PROXY). See otlptracehttp.WithProxy for details.
func WithRetry ¶
func WithRetry(rc otlptracehttp.RetryConfig) Option
WithRetry configures OTLP retry behavior.
func WithTLSClientConfig ¶
WithTLSClientConfig configures the HTTP client's TLS settings.
func WithTimeout ¶
WithTimeout configures the OTLP export timeout.