-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
Can we consider making a configuration option to support PercentageSampler?
Sampling may be employed to reduce the data collected and reported out of process.
https://github.com/openzipkin/zipkin-php#sampling
public function createZipkinDriver()
{
$tracer = new ZipkinTracer(
$this->config->get('tracing.service_name'),
$this->config->get('tracing.zipkin.host'),
$this->config->get('tracing.zipkin.port'),
$this->config->get('tracing.zipkin.options.128bit'),
$this->config->get('tracing.zipkin.options.request_timeout', 5)
);
ZipkinTracer::setMaxTagLen(
$this->config->get('tracing.zipkin.options.max_tag_len', ZipkinTracer::getMaxTagLen())
);
return $tracer->init();
} public function init(): Tracer
{
$this->tracing = TracingBuilder::create()
->havingLocalEndpoint($this->createEndpoint())
->havingTraceId128bits($this->usesTraceId128bits)
->havingSampler($this->createSampler())
->havingReporter($this->createReporter())
->build();
$this->registerDefaultExtractionFormats();
$this->registerDefaultInjectionFormats();
return $this;
} protected function createSampler(): Sampler
{
return BinarySampler::createAsAlwaysSample();
}Metadata
Metadata
Assignees
Labels
No labels