|
2 | 2 |
|
3 | 3 | declare(strict_types=1); |
4 | 4 |
|
| 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 | + |
5 | 17 | 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 | + */ |
6 | 28 | 'context' => [ |
7 | 29 | 'key' => 'telemetry', |
8 | 30 | ], |
9 | 31 |
|
| 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 | + */ |
10 | 43 | '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) |
13 | 52 | 'trace_id' => 'X-Telemetry-Trace-Id', |
14 | 53 | ], |
15 | 54 | ]; |
0 commit comments