function InstrumentationTrait::validateImplementation
1 call to InstrumentationTrait::validateImplementation()
- InstrumentationTrait::activate in vendor/
open-telemetry/ api/ Instrumentation/ InstrumentationTrait.php - This method registers and activates the instrumentation with the OpenTelemetry API/SDK and thus the instrumentation will be used to generate telemetry data.
File
-
vendor/
open-telemetry/ api/ Instrumentation/ InstrumentationTrait.php, line 174
Class
- InstrumentationTrait
- This trait in conjunction with the InstrumentationInterface is meant as a base for instrumentations for the OpenTelemetry API. Instrumentations need to implement the abstract methods of this trait (besides any instrumentation specific code)
Namespace
OpenTelemetry\API\InstrumentationCode
private function validateImplementation() : void {
if (!$this instanceof InstrumentationInterface) {
throw new RuntimeException(sprintf('"%s" is meant to implement "%s"', InstrumentationTrait::class, InstrumentationInterface::class));
}
}