Documentation ¶
Index ¶
- func NewTracerProvider(tp trace.TracerProvider, options ...Option) trace.TracerProvider
- type Config
- type Option
- func WithAddSpanName(bool) Option
- func WithAppName(string) Option
- func WithDefaultProfileURLBuilder(_, _ string) Option
- func WithProfileBaselineLabels(map[string]string) Option
- func WithProfileBaselineURL(bool) Option
- func WithProfileURL(bool) Option
- func WithProfileURLBuilder(func(_ string) string) Option
- func WithPyroscopeURL(string) Option
- func WithRootSpanOnly(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 samples with span_id label. This allows to establish a relationship between pprof profiles and reported tracing spans.
Types ¶
type Config ¶
type Config struct { AppName string PyroscopeURL string IncludeProfileURL bool IncludeProfileBaselineURL bool ProfileBaselineLabels map[string]string RootOnly bool AddSpanName bool }
Config describes tracer configuration. DEPRECATED: Do not use.
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. DEPRECATED: Ignored by tracer.
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. DEPRECATED: Ignored by tracer.
func WithDefaultProfileURLBuilder ¶
WithDefaultProfileURLBuilder specifies the default profile URL builder. DEPRECATED: Ignored by tracer.
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. DEPRECATED: Ignored by tracer.
func WithProfileBaselineURL ¶
WithProfileBaselineURL specifies whether to add the pyroscope.profile.baseline.url attribute with the URL to the baseline profile. See WithProfileBaselineLabels. DEPRECATED: Ignored by tracer.
func WithProfileURL ¶
WithProfileURL specifies whether to add the pyroscope.profile.url attribute with the URL to the span profile. DEPRECATED: Ignored by tracer.
func WithProfileURLBuilder ¶
WithProfileURLBuilder specifies how profile URL is to be built. DEPRECATED: Ignored by tracer.
func WithPyroscopeURL ¶
WithPyroscopeURL provides a base URL for the profile and baseline URLs. Required, if profile URL or profile baseline URL is enabled. DEPRECATED: Ignored by tracer.
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. DEPRECATED: Ignored by tracer.