summaryrefslogtreecommitdiff
path: root/vendor/open-telemetry/sdk/Trace/Link.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/open-telemetry/sdk/Trace/Link.php')
-rw-r--r--vendor/open-telemetry/sdk/Trace/Link.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/open-telemetry/sdk/Trace/Link.php b/vendor/open-telemetry/sdk/Trace/Link.php
new file mode 100644
index 000000000..9927839e7
--- /dev/null
+++ b/vendor/open-telemetry/sdk/Trace/Link.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OpenTelemetry\SDK\Trace;
+
+use OpenTelemetry\API\Trace as API;
+use OpenTelemetry\SDK\Common\Attribute\AttributesInterface;
+
+final class Link implements LinkInterface
+{
+ private AttributesInterface $attributes;
+ private API\SpanContextInterface $context;
+
+ public function __construct(API\SpanContextInterface $context, AttributesInterface $attributes)
+ {
+ $this->context = $context;
+ $this->attributes = $attributes;
+ }
+
+ public function getSpanContext(): API\SpanContextInterface
+ {
+ return $this->context;
+ }
+
+ public function getAttributes(): AttributesInterface
+ {
+ return $this->attributes;
+ }
+}