Passed
Pull Request — master (#8)
by
unknown
03:37 queued 48s
created

SpanAttributeHelper::setAttributes()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 2
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 2
nc 2
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Umbrellio\Jaravel\Services\Span;
6
7
use OpenTelemetry\API\Trace\SpanInterface;
8
9
class SpanAttributeHelper
10
{
11
    public static function setAttributes(SpanInterface $span, array $attributes): void
12
    {
13
        foreach ($attributes as $attribute => $value) {
14
            $span->setAttribute($attribute, (string) $value);
15
        }
16
    }
17
}
18