summaryrefslogtreecommitdiff
path: root/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-10-20 17:12:29 +0300
committerAndrew Dolgov <[email protected]>2023-10-20 21:13:39 +0300
commitcdd7ad020e165fe680703b6d3319b908b682fb7a (patch)
treeb51eb09b7b4587e8fbc5624ac8d88d28cfcd0b04 /vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php
parent45a9ff0c88cbd33892ff16ab837e9059937d656e (diff)
jaeger-client -> opentelemetry
Diffstat (limited to 'vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php')
-rw-r--r--vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php68
1 files changed, 0 insertions, 68 deletions
diff --git a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php b/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php
deleted file mode 100644
index 7c6ba3d62..000000000
--- a/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Sampler/ConstSampler.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-namespace Jaeger\Sampler;
-
-use const Jaeger\SAMPLER_PARAM_TAG_KEY;
-use const Jaeger\SAMPLER_TYPE_CONST;
-use const Jaeger\SAMPLER_TYPE_TAG_KEY;
-
-/**
- * ConstSampler always returns the same decision.
- *
- * @package Jaeger\Sampler
- */
-class ConstSampler implements SamplerInterface
-{
- /**
- * Whether or not the new trace should be sampled.
- *
- * @var bool
- */
- private $decision;
-
- /**
- * A list of the sampler tags.
- *
- * @var array
- */
- private $tags = [];
-
- /**
- * ConstSampler constructor.
- *
- * @param bool $decision
- */
- public function __construct(bool $decision = true)
- {
- $this->tags = [
- SAMPLER_TYPE_TAG_KEY => SAMPLER_TYPE_CONST,
- SAMPLER_PARAM_TAG_KEY => $decision,
- ];
-
- $this->decision = $decision;
- }
-
- /**
- * {@inheritdoc}
- *
- * @param string $traceId The traceId on the span.
- * @param string $operation The operation name set on the span.
- * @return array
- */
- public function isSampled(string $traceId, string $operation = ''): array
- {
- return [$this->decision, $this->tags];
- }
-
- /**
- * {@inheritdoc}
- *
- * Only implemented to satisfy the sampler interface.
- *
- * @return void
- */
- public function close()
- {
- // nothing to do
- }
-}