Skip to content

Commit

Permalink
add to known detectors
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-hensley committed May 13, 2024
1 parent 906f08f commit bbddaa8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/SDK/Common/Configuration/KnownValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ interface KnownValues
public const VALUE_DETECTORS_PROCESS_RUNTIME = 'process_runtime';
public const VALUE_DETECTORS_SDK = 'sdk';
public const VALUE_DETECTORS_SDK_PROVIDED = 'sdk_provided';
public const VALUE_DETECTORS_SERVICE = 'service';
public const VALUE_DETECTORS_COMPOSER = 'composer';
public const OTEL_PHP_DETECTORS = [
self::VALUE_ALL,
Expand Down
4 changes: 4 additions & 0 deletions src/SDK/Resource/ResourceInfoFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public static function defaultResource(): ResourceInfo

foreach ($detectors as $detector) {
switch ($detector) {
case Values::VALUE_DETECTORS_SERVICE:
$resourceDetectors[] = new Detectors\Service();

break;
case Values::VALUE_DETECTORS_ENVIRONMENT:
$resourceDetectors[] = new Detectors\Environment();

Expand Down

0 comments on commit bbddaa8

Please sign in to comment.