Is there a convenience method to insert annotations for the entire app (all requests should have them)?
Right now seems like needing to customise SegmentCollector.php
public function initHttpTracer(Request $request): void
{
if (! $this->isTracerEnabled()) {
return;
}
$this->segments = [];
$tracer = $this->tracer()
->setTraceHeader($_SERVER['HTTP_X_AMZN_TRACE_ID'] ?? null)
->setName(config('app.name'))
->setClientIpAddress($request->getClientIp())
->addAnnotation('Framework', 'Laravel ' . app()->version())
->addAnnotation('PHP Version', PHP_VERSION)
// EXTRA ANNONTATION TO DEFINE SYSTEM BOUNDARY
->addAnnotation("System", "SYSTEM NAME TO DIFFERENTIATE FROM OTHERS")
->setUrl($request->url())
->setMethod($request->method());
$tracer->begin(100);
}
Is there a convenience method to insert annotations for the entire app (all requests should have them)?
Right now seems like needing to customise SegmentCollector.php