-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
The severity_parser in filelogreceiver parses the level of log as 'debug' and not 'DEBUG' #26718
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Thanks for reporting about this @shiva-fyers. I think technically the behavior is correct. However you are not the first person to expect something else here, so I'm happy to report I think I have a solution for you. First, regarding the reason why I think this is correct behavior. It's not called out very prominently, but in our specification, we describe severity text as Very recently a similar question was raised, regarding whether it should be possible to overwrite the severity text with the official strings that correspond to the numbers. See #26671. I believe this same solution would provide the behavior you expect. I will try to get a PR out for it this week. |
I understand @djaglowski . I couldn't be more grateful for your response and time. Thanks and Regards |
Component(s)
receiver/filelog
What happened?
Description
I am trying to read logs from a file "gg.log" using the filelogreceiver.
There is only one entry in the file which looks something like this.
{"level":"DEBUG","additionalData":"bytes":1887389,"file":"BSE_CM.csv"},"requestId":"","fyId":"","location":"data_rest/develop/controllers.Downloadfroms3.func1[symbol_master_s3.go:110]","time":"2023-09-01T02:32:38Z","message":"Downloaded file"}
Steps to Reproduce
Please check the otel collector config.
Expected Result
Actual Result
The field I am pointing at is the
SeverityText
field.The result I am getting is
SeverityText: debug
But according to this opentelemetry doc
The result should have been
SeverityText: DEBUG
i.e log level in uppercase ('DEBUG' and not 'debug').
If I am wrong with the assumption that "the level needs to be always uppercase", then let me know, I will close this.
Apologies if I might have missed something or misinterpret anything.
Thanks & Regards
Collector version
v0.83.0
Environment information
Environment
OS: (e.g., "Ubuntu 22.04")
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: