Documentation
¶
Index ¶
- func NewTracerProvider(tp trace.TracerProvider, options ...Option) trace.TracerProvider
- type Config
- type Option
- func WithAddSpanName(x bool) Option
- func WithAppName(app string) Option
- func WithDefaultProfileURLBuilder(_, _ string) Option
- func WithProfileBaselineLabels(x map[string]string) Option
- func WithProfileBaselineURL(x bool) Option
- func WithProfileURL(x bool) Option
- func WithProfileURLBuilder(b func(_ string) string) Option
- func WithPyroscopeURL(addr string) Option
- func WithRootSpanOnly(x bool) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTracerProvider ¶
func NewTracerProvider(tp trace.TracerProvider, options ...Option) trace.TracerProvider
NewTracerProvider creates a new tracer provider that annotates pprof profiles with span ID tag. This allows to establish a relationship between pprof profiles and reported tracing spans.
Types ¶
type Option ¶
type Option func(*tracerProvider)
func WithAddSpanName ¶
WithAddSpanName specifies whether the current span name should be added to the profile labels. N.B if the name is dynamic, or too many values are supposed, this may significantly deteriorate performance. By default, span name is not added to profile labels.
func WithAppName ¶
WithAppName specifies the profiled application name. It should match the name specified in pyroscope configuration. Required, if profile URL or profile baseline URL is enabled.
func WithDefaultProfileURLBuilder ¶
WithDefaultProfileURLBuilder specifies the default profile URL builder. DEPRECATED: use WithProfileURL
func WithProfileBaselineLabels ¶
WithProfileBaselineLabels provides a map of extra labels to be added to the baseline query alongside with pprof labels set in runtime. Typically, it should match the labels specified in the Pyroscope profiler config. Note that the map must not be modified.
func WithProfileBaselineURL ¶
WithProfileBaselineURL specifies whether to add the pyroscope.profile.baseline.url attribute with the URL to the baseline profile. See WithProfileBaselineLabels.
func WithProfileURL ¶
WithProfileURL specifies whether to add the pyroscope.profile.url attribute with the URL to the span profile.
func WithProfileURLBuilder ¶
WithProfileURLBuilder specifies how profile URL is to be built. DEPRECATED: use WithProfileURL
func WithPyroscopeURL ¶
WithPyroscopeURL provides a base URL for the profile and baseline URLs. Required, if profile URL or profile baseline URL is enabled.
func WithRootSpanOnly ¶
WithRootSpanOnly indicates that only the root span is to be profiled. The profile includes samples captured during child span execution but the spans won't have their own profiles and won't be annotated with pyroscope.profile attributes. The option is enabled by default.