-
Notifications
You must be signed in to change notification settings - Fork 539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pino: Allow logging trace metadata under different keys #1664
Comments
I think it would be more flexible to allow to override the actual key names instead of adding just one more fixed set. e.g
And well, it would be nice to have the same/similar config for other log instrumentations like winston,... |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
Not stale |
This could also be useful for specific log destinations. For example. GCP requires the following format: const trace = `projects/${projectId}/traces/${traceId}`;
res['logging.googleapis.com/trace'] = trace;
}
res['logging.googleapis.com/trace_sampled'] = traceFlags;
res['logging.googleapis.com/spanId'] = spanId; |
@drewcorlin1 This can be closed now, right (it was handled by #1867)? |
Yes! |
Is your feature request related to a problem? Please describe
The current pino instrumentation from
@opentelemetry/instrumentation-pino
injects 3 fields into each log,trace_id
,span_id
andtrace_flags
. These fields are useful, but the snake case naming is slightly problematic in my case, where my company has strict logging standards and we'd like to use camelCase.Describe the solution you'd like to see
Allowing a different set of keys to be used in the config (this is assuming you are configuring the instrumentation via
getNodeAutoInstrumentations
from@opentelemetry/auto-instrumentations-node
).Describe alternatives you've considered
Reformatting the log manually, via the
logHook
config.Additional context
The text was updated successfully, but these errors were encountered: