Documentation
¶
Overview ¶
Package sentryhttpclient provides Sentry integration for Requests modules to enable distributed tracing between services. It is compatible with `net/http.RoundTripper`.
import sentryhttpclient "github.com/getsentry/sentry-go/httpclient"
roundTrippper := sentryhttpclient.NewSentryRoundTripper(nil, nil)
client := &http.Client{
Transport: roundTripper,
}
request, err := client.Do(request)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSentryRoundTripper ¶
func NewSentryRoundTripper(originalRoundTripper http.RoundTripper, opts ...SentryRoundTripTracerOption) http.RoundTripper
NewSentryRoundTripper provides a wrapper to existing http.RoundTripper to have required span data and trace headers for outgoing HTTP requests.
- If `nil` is passed to `originalRoundTripper`, it will use http.DefaultTransport instead.
Types ¶
type SentryRoundTripTracerOption ¶
type SentryRoundTripTracerOption func(*SentryRoundTripper)
SentryRoundTripTracerOption provides a specific type in which defines the option for SentryRoundTripper.
func WithTracePropagationTargets ¶
func WithTracePropagationTargets(targets []string) SentryRoundTripTracerOption
WithTracePropagationTargets configures additional trace propagation targets URL for the RoundTripper. Does not support regex patterns.
type SentryRoundTripper ¶
type SentryRoundTripper struct {
// contains filtered or unexported fields
}
SentryRoundTripper provides a http.RoundTripper implementation for Sentry Requests module.
Click to show internal directories.
Click to hide internal directories.