Skip to content

Commit

Permalink
Disable modules instrumentation if opentelemetry instrumentation is d…
Browse files Browse the repository at this point in the history
…isabled.
  • Loading branch information
asmarovydlo committed Nov 8, 2024
1 parent 5ff2f6e commit b9cf95f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions _register.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
use OpenTelemetry\SDK\Sdk;
use Spryker\Service\Opentelemetry\Instrumentation\SprykerInstrumentationBootstrap;

if (Sdk::isDisabled()) {
return;
}

if (class_exists(Sdk::class) && Sdk::isInstrumentationDisabled(SprykerInstrumentationBootstrap::NAME) === true) {
return;
}
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"require": {
"open-telemetry/api": "^1.0",
"open-telemetry/sdk": "^1.0",
"open-telemetry/sdk": "^1.0",
"open-telemetry/sem-conv": "^1.0",
"php": ">=8.1",
"spryker/kernel": "^3.30.0",
Expand Down

0 comments on commit b9cf95f

Please sign in to comment.