Record trace id and EntryPoint span id into access log

This commit is contained in:
weijiany 2024-09-03 22:40:04 +08:00 committed by GitHub
parent 3eb7ecce19
commit e8335a94a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 39 additions and 0 deletions

View file

@ -77,6 +77,11 @@ const (
TLSCipher = "TLSCipher"
// TLSClientSubject is the string representation of the TLS client certificate's Subject.
TLSClientSubject = "TLSClientSubject"
// TraceID is the consistent identifier for tracking requests across services, including upstream ones managed by Traefik, shown as a 32-hex digit string.
TraceID = "TraceId"
// SpanID is the unique identifier for Traefiks root span (EntryPoint) within a request trace, formatted as a 16-hex digit string.
SpanID = "SpanId"
)
// These are written out in the default case when no config is provided to specify keys of interest.