26 lines
774 B
PHP
26 lines
774 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace OpenTelemetry\SDK\Resource\Detectors;
|
||
|
|
||
|
use OpenTelemetry\SDK\Common\Attribute\Attributes;
|
||
|
use OpenTelemetry\SDK\Resource\ResourceDetectorInterface;
|
||
|
use OpenTelemetry\SDK\Resource\ResourceInfo;
|
||
|
use OpenTelemetry\SemConv\ResourceAttributes;
|
||
|
|
||
|
/**
|
||
|
* @see https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md#semantic-attributes-with-sdk-provided-default-value
|
||
|
*/
|
||
|
final class SdkProvided implements ResourceDetectorInterface
|
||
|
{
|
||
|
public function getResource(): ResourceInfo
|
||
|
{
|
||
|
$attributes = [
|
||
|
ResourceAttributes::SERVICE_NAME => 'unknown_service:php',
|
||
|
];
|
||
|
|
||
|
return ResourceInfo::create(Attributes::create($attributes), ResourceAttributes::SCHEMA_URL);
|
||
|
}
|
||
|
}
|