Skip to content

Commit 9f7b695

Browse files
authored
Merge pull request #7 from BboyKeen/rum-header
Use RUM header to allow distributed tracing
2 parents 78c010d + 08ca9b1 commit 9f7b695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Wrappers/Traits/EventTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private function initContext(EventSharedData $sharedData) : Context
6969
{
7070
// Generate Random UUIDs
7171
$this->id = UID::Generate(16); //Uuid::uuid4()->toString();
72-
$this->trace_id = UID::Generate(16); //Uuid::uuid4()->toString();
72+
$this->trace_id = $this->trace_id = $_SERVER['HTTP_ELASTIC_APM_TRACEPARENT'] ? : UID::Generate(16); //Uuid::uuid4()->toString();
7373

7474
// Set Shared Context Variable for further use
7575
$this->sharedData = $sharedData;

0 commit comments

Comments
 (0)