Custom Fields in Logger Detail View with NodeJS/Winson
TLDR Harald asked how to add custom fields to the logger detail view using NodeJS/winson. Srikanth provided a user guide link and confirmed that using the opentelemetry instrumentation winston package would help.
1
Mar 17, 2023 (9 months ago)
Harald
05:17 PMHarald
05:17 PMconst extra = { extra : { duno: "foo", whatever: "bar" } };
app.listen(port, () => {
logger.log('info', 'Example app listening at :%d', port, extra);
});
Harald
05:18 PMHarald
05:19 PMHarald
05:20 PMbatch_id
or a customer_id
which makes it easy to debugHarald
06:02 PMSrikanth
06:03 PMHarald
06:03 PMHarald
06:04 PMSrikanth
06:04 PMHarald
06:08 PM<http://logger.info|logger.info>( ...
ok -check-Harald
06:09 PMSigNoz Community
Indexed 1023 threads (61% resolved)
Similar Threads
Extracting Custom Fields as Attributes from Log in SigNoz
Harald wants to have custom fields from their body parsed as attributes in the SigNoz logger. They have tried implementing suggestions from nitya-signoz and Prashant, but the issue remains unsolved due to a potential race condition encountered while executing the code. They have provided a full example using Kind for further assistance.
Discussing Processor Pipeline and Column Creation for Faster Searching
Shivam inquired about creating trace_id and span_id in processor pipelines and ran into issues. nitya-signoz clarified that trace_id cannot be copied and suggested making fields selected in the explorer page to improve search speed. Shivam understood this solution.
Adding Traceid in Logs and Utilizing Helm for SigNoz Installation
Charan sought assistance on adding traceid in logs. nitya-signoz advised how to parse it and Prashant suggested modification of the logtransform processor or addition of a new one as a solution.
Configuring trace_id and span_id Extraction in Node App Logs
Saad was struggling to extract trace_id and span_id from their node app logs and asked for help. nitya-signoz instructed them to add the processor to the services, and this solved the issue.
Adding Labels to Logs in SigNoz Using Pipelines
Tarek was trying to add labels from a JSON body to SigNoz logs. nitya-signoz and Shivanshu helped by providing pipeline examples and configurations. nitya-signoz's solution eventually resolved the issue.