Issues with Adding SpanId and TraceId to Log Entries in SigNoz
TLDR Hannes was struggling with adding spanId and traceId to log entries using SigNoz. Nocnica offered support, after which Hannes managed to solve the issue by using regex_parser
& key_value_parser
.
Jul 14, 2023 (5 months ago)
Hannes
06:18 PM1. Should I be using rsyslog for this, or is there a better way to send log entries from the application to SigNoz?
2. If I should, should I be using a regex parser operator in the syslog entry of the otel-collector-config?
3. Is there a better/easier way?
Nocnica
11:07 PMJul 15, 2023 (5 months ago)
Hannes
04:24 AMregex_parser
& key_value_parser
: logstransform/internal:
operators:
- type: regex_parser
regex: 'trace_id=(?P<trace_id>\S*)'
- type: key_value_parser
parse_to: attributes
- type: regex_parser
regex: 'span_id=(?P<span_id>\S*)'
- type: key_value_parser
parse_to: attributes
SigNoz Community
Indexed 1023 threads (61% resolved)
Similar Threads
Resolving Log Parsing Issue in Python OpenTelemetry
Diogo was experiencing issues with log tracing in Python OpenTelemetry. nitya-signoz suggests parsing trace_id and span_id from the log message body or using pipelines feature. Despite partial success, Diogo continued to experience issues with `trace_id`.
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.
Parsing log entry and extracting fields with OTEL
Syed needed help parsing a log entry and extracting fields using OTEL. nitya-signoz provided guidance and the correct configurations, resolving the issue.