You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TRACE_EXPORTER=gofr logs TRACER_URL credentials unredacted on every failed span export #4495
With TRACE_EXPORTER=gofr, every failed span export logs the raw TRACER_URL, including credentials in its userinfo or query string. The startup log line and the OTel error handler already redact the URL, but the gofr exporter's own export-failure log does not.
Since TRACER_HEADERS is documented as unsupported for the gofr exporter, credentials in the URL are the only way to authenticate it.
ERROR failed to post spans on 'http://bob:S3CRETPASS@127.0.0.1:63676/api/spans?api_key=TOPSECRETKEY', unexpected response status code: '401'
ERROR failed to post spans on 'http://REDACTED@127.0.0.1:63676/api/spans?REDACTED', unexpected response status code: '401'
The first line comes from the exporter itself. The second is the same error logged again by the OTel error handler, redacted.
Root cause
pkg/gofr/exporter.go (processSpans, around lines 83-99) builds failed to post spans on '%v' from e.endpoint and logs it through its own logger without redaction. The client.Do error is also logged raw, and it can contain the URL as well.
Suggested fix
Use exporters.RedactURL(e.endpoint) in the message, and exporters.RedactMessage on the client.Do error.
Or drop the exporter's own log line, since the returned error is already logged (redacted) by the OTel error handler.
Add a test asserting the secret does not appear in the logs.
Activity