summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php')
-rw-r--r--vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php b/vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php
new file mode 100644
index 000000000..d2976c63d
--- /dev/null
+++ b/vendor/open-telemetry/context/Propagation/PropagationGetterInterface.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\Context\Propagation;
+
+/**
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#getter-argument
+ */
+interface PropagationGetterInterface
+{
+ /**
+ * Returns the list of all the keys in the carrier.
+ *
+ * @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/context/api-propagators.md#keys
+ *
+ * @return list<string>
+ */
+ public function keys($carrier): array;
+
+ /**
+ * Gets the value of a given key from a carrier.
+ */
+ public function get($carrier, string $key) : ?string;
+}