Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 891e58d

Browse files
committed
config
1 parent 4916670 commit 891e58d

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ OTEL_TRACES_EXPORTER=otlp
4040
#OTEL_EXPORTER_OTLP_PROTOCOL=grpc
4141
OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4318
4242
OTEL_PROPAGATORS=baggage,tracecontext
43+
44+
OTEL_ALLOWED_HEADERS=*
45+
OTEL_SENSITIVE_HEADERS=authorization,authorization,proxy-authorization
46+
OTEL_IGNORE_PATHS=/foo,/bar*
4347
```
4448
and other environment variables, you can find them in the configuration file: `config/otle.php`.
4549

config/otel.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,28 @@
1616
/**
1717
* Allow to trace requests with specific headers. You can use `*` as wildcard.
1818
*/
19-
'allowed_headers' => [
19+
'allowed_headers' => explode(',', env('OTEL_ALLOWED_HEADERS', join(',', [
2020
'referer',
2121
'x-*',
2222
'accept',
2323
'request-id',
24-
],
24+
]))),
2525

2626
/**
2727
* Sensitive headers will be marked as *** from the span attributes. You can use `*` as wildcard.
2828
*/
29-
'sensitive_headers' => [
29+
'sensitive_headers' => explode(',', env('OTEL_SENSITIVE_HEADERS', join(',', [
3030
// 'cookie',
3131
// 'authorization',
32-
// ...
33-
],
32+
]))),
3433

3534
/**
3635
* Ignore paths will not be traced. You can use `*` as wildcard.
3736
*/
38-
'ignore_paths' => [
37+
'ignore_paths' => explode(',', env('OTEL_IGNORE_PATHS', join(',', [
3938
// 'api/*',
4039
// 'webhook/*',
41-
],
40+
]))),
4241

4342
/**
4443
* The name of the header that will be used to pass the trace id in the response.

0 commit comments

Comments
 (0)