diff --git a/simple-otel.php b/simple-otel.php new file mode 100644 index 0000000..43667c5 --- /dev/null +++ b/simple-otel.php @@ -0,0 +1,33 @@ +create(); + $GLOBALS['tracer'] = $tracerProvider->getTracer('wordpress'); + + $shutdownHandler = new ShutdownHandler($tracerProvider); + register_shutdown_function([$shutdownHandler, 'shutdown']); +} +add_action('init', 'otel_init'); + +function otel_trace_example() { + $tracer = $GLOBALS['tracer']; + $span = $tracer->startAndActivateSpan('example-span'); + + // Your custom code + + $tracer->endActiveSpan(); +} +add_action('wp_head', 'otel_trace_example'); +?> diff --git a/simple-status.php b/simple-status.php deleted file mode 100644 index a92c3e7..0000000 --- a/simple-status.php +++ /dev/null @@ -1,16 +0,0 @@ -