Hi All, Am trying to send my Spring Boot Applicat...
# general
s
Hi All, Am trying to send my Spring Boot Application's logs to Signoz. This is the format of the logs.
16:04:19.678  INFO --- [erListUpdater-0] c.c.a.config.SpringProfileConfig      :  Using local profile
I have referred https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/filelogreceiver/README.md and added the following to otel-collector-config.yaml
include: [ "/tmp/tomcat.log" ]
start_at:
include_file_path: true
include_file_name: false
operators:
- type: regex_parser
regex: '^(?P<time>\d{2}-[A-Za-z]{3}-\d{2} \d{2}:\d{2}:\d{2}.\d{3}) (?P<sev>[A-Z]*) (?P<msg>.*)$'
timestamp:
parse_from: attributes.time
layout: '%Y-%m-%d %H:%M:%S'
severity:
parse_from: attributes.sev
But it isnt working as expected. Can someone please help ?
p
cc @nitya-signoz
n
Your regex seems to be wrong. https://regex101.com/r/ALm0tk/1
Incase you want to use the java otel agent which will automatically send parsed logs please follow this issue. https://github.com/SigNoz/signoz.io/issues/855 https://signoz.io/docs/userguide/collecting_application_logs_otel_sdk_java/
s
@nitya-signoz Ours is a web application which generates WAR. Do you have any docs for sending parsed logs from a web application ?