(integration: &str, version: &str)
| 28 | /// Returns a singleton instance of `InstrumentHooks`. |
| 29 | #[inline(always)] |
| 30 | pub fn instance(integration: &str, version: &str) -> &'static Self { |
| 31 | static INSTANCE: OnceLock<InstrumentHooks> = OnceLock::new(); |
| 32 | INSTANCE.get_or_init(|| { |
| 33 | let instance = |
| 34 | InstrumentHooks::new().expect("Failed to initialize InstrumentHooks"); |
| 35 | instance |
| 36 | .set_integration(integration, version) |
| 37 | .expect("Failed to set integration"); |
| 38 | instance |
| 39 | }) |
| 40 | } |
| 41 | |
| 42 | #[inline(always)] |
| 43 | pub fn is_instrumented(&self) -> bool { |
nothing calls this directly
no test coverage detected