Skip to content

Commit bec6c8f

Browse files
Merge pull request #7 from TheDragonCode/1.x
Enhance telemetry config with extended comments and improved header key documentation
2 parents f393bf1 + 124aa1c commit bec6c8f

File tree

1 file changed

+41
-2
lines changed

1 file changed

+41
-2
lines changed

config/telemetry.php

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,53 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
|--------------------------------------------------------------------------
7+
| Laravel Telemetry — configuration
8+
|--------------------------------------------------------------------------
9+
|
10+
| Here you can configure the behavior of the telemetry collection package.
11+
| The file reads your code at runtime and is not cached separately.
12+
| If necessary, publish the configuration file and adjust the values to
13+
| your needs.
14+
|
15+
*/
16+
517
return [
18+
19+
/*
20+
|--------------------------------------------------------------------------
21+
| Telemetry context
22+
|--------------------------------------------------------------------------
23+
|
24+
| The root context key. Used to group telemetry data in arrays/logs/reporters.
25+
| Change only when explicitly necessary.
26+
|
27+
*/
628
'context' => [
729
'key' => 'telemetry',
830
],
931

32+
/*
33+
|--------------------------------------------------------------------------
34+
| HTTP header names
35+
|--------------------------------------------------------------------------
36+
|
37+
| Configure the names of incoming/outgoing headers that will be used to
38+
| transfer telemetry data between services.
39+
|
40+
| They must remain consistent across all services that exchange telemetry.
41+
|
42+
*/
1043
'headers' => [
11-
'user_id' => 'X-Telemetry-User-Id',
12-
'ip' => 'X-Telemetry-Ip',
44+
45+
// Authenticated user's identifier (if any)
46+
'user_id' => 'X-Telemetry-User-Id',
47+
48+
// Client IP address captured on ingress
49+
'ip' => 'X-Telemetry-Ip',
50+
51+
// Request trace identifier (trace/span)
1352
'trace_id' => 'X-Telemetry-Trace-Id',
1453
],
1554
];

0 commit comments

Comments
 (0)