Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
// KeyArea is the key to represent the current flamingo area
KeyArea, _ = tag.NewKey("area")
)
Functions ¶
func URLPrefixSampler ¶
func URLPrefixSampler(allowed, blocked []string, allowParentTrace bool) func(*http.Request) trace.StartOptions
URLPrefixSampler creates a sampling getter for ochttp.Server.
If the whitelist is empty it is treated as allowed, otherwise checked first. If the blacklist is set it will disable sampling again. If takeParentDecision is set we allow the decision to be taken from incoming tracing, otherwise we enforce our decision
Types ¶
type ConfiguredURLPrefixSampler ¶
type ConfiguredURLPrefixSampler struct { Whitelist config.Slice Blacklist config.Slice AllowParentTrace bool }
ConfiguredURLPrefixSampler constructs the prefix GetStartOptions getter with the default opencensus configuration
func (*ConfiguredURLPrefixSampler) GetStartOptions ¶
func (c *ConfiguredURLPrefixSampler) GetStartOptions() func(*http.Request) trace.StartOptions
GetStartOptions constructor for ochttp.Server
func (*ConfiguredURLPrefixSampler) Inject ¶ added in v3.3.0
func (c *ConfiguredURLPrefixSampler) Inject( cfg *struct { Whitelist config.Slice `inject:"config:flamingo.opencensus.tracing.sampler.whitelist,optional"` Blacklist config.Slice `inject:"config:flamingo.opencensus.tracing.sampler.blacklist,optional"` AllowParentTrace bool `inject:"config:flamingo.opencensus.tracing.sampler.allowParentTrace,optional"` }, ) *ConfiguredURLPrefixSampler
Inject dependencies
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module registers the opencensus module which in turn enables jaeger & co. Deprecated: OpenCensus was discontinued in favor of OpenTelemetry, please use flamingo.me/opentelemetry instead.
func (*Module) FlamingoLegacyConfigAlias ¶ added in v3.1.0
FlamingoLegacyConfigAlias maps legacy config to new
func (*Module) Inject ¶ added in v3.3.0
func (m *Module) Inject( cfg *struct { Endpoint string `inject:"config:flamingo.opencensus.jaeger.endpoint"` ServiceName string `inject:"config:flamingo.opencensus.serviceName"` ServiceAddr string `inject:"config:flamingo.opencensus.serviceAddr"` JaegerEnable bool `inject:"config:flamingo.opencensus.jaeger.enable"` ZipkinEnable bool `inject:"config:flamingo.opencensus.zipkin.enable"` ZipkinEndpoint string `inject:"config:flamingo.opencensus.zipkin.endpoint"` }, ) *Module
Inject dependencies