Skip to content

Commit

Permalink
Don't throw exception if instrumented function is missing (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
intuibase authored Jan 2, 2025
1 parent c3d82ac commit 8db652d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions prod/php/ElasticOTel/InstrumentationBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

use Closure;
use Elastic\OTel\Util\SingletonInstanceTrait;
use RuntimeException;
use Throwable;

/**
Expand Down Expand Up @@ -90,11 +89,7 @@ private static function elasticOTelHook(?string $class, string $function, ?Closu
return;
}

throw new RuntimeException(
'elastic_otel_hook returned false'
. ($class === null ? '' : ('; class: ' . $dbgClassAsString))
. '; function: ' . $function
);
BootstrapStageLogger::logDebug('elastic_otel_hook returned false: ' . $dbgClassAsString . ', function: ' . $function, __FILE__, __LINE__, __CLASS__, __FUNCTION__);
}

private static function elasticOTelHookNoThrow(?string $class, string $function, ?Closure $pre = null, ?Closure $post = null): bool
Expand Down

0 comments on commit 8db652d

Please sign in to comment.