From cdd7ad020e165fe680703b6d3319b908b682fb7a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 20 Oct 2023 17:12:29 +0300 Subject: jaeger-client -> opentelemetry --- .../FilteredAttributeProcessor.php | 33 ++++++++++++++++++++++ .../IdentityAttributeProcessor.php | 20 +++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 vendor/open-telemetry/sdk/Metrics/AttributeProcessor/FilteredAttributeProcessor.php create mode 100644 vendor/open-telemetry/sdk/Metrics/AttributeProcessor/IdentityAttributeProcessor.php (limited to 'vendor/open-telemetry/sdk/Metrics/AttributeProcessor') diff --git a/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/FilteredAttributeProcessor.php b/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/FilteredAttributeProcessor.php new file mode 100644 index 000000000..c4df8e878 --- /dev/null +++ b/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/FilteredAttributeProcessor.php @@ -0,0 +1,33 @@ +attributeKeys = $attributeKeys; + } + + public function process(AttributesInterface $attributes, ContextInterface $context): AttributesInterface + { + $filtered = []; + foreach ($this->attributeKeys as $key) { + $filtered[$key] = $attributes->get($key); + } + + return new Attributes($filtered, 0); + } +} diff --git a/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/IdentityAttributeProcessor.php b/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/IdentityAttributeProcessor.php new file mode 100644 index 000000000..f261563ea --- /dev/null +++ b/vendor/open-telemetry/sdk/Metrics/AttributeProcessor/IdentityAttributeProcessor.php @@ -0,0 +1,20 @@ +