opentelemetry-rust
opentelemetry-rust copied to clipboard
Stop populating severity text and instead auto-deduct it from severity number
Mentioned here : https://github.com/open-telemetry/opentelemetry-rust/pull/1997/files#r1707954979
I wonder if should even remove SeverityText from LogRecord itself to reduce the size of LogRecord. I am not aware of any use case where user puts severity number and different text, so exporters can simply derive SeverityText from the numbered field to save perf.
@lalitb Please share your thoughts.
Agree on this. If we are always going to populate the textual representation of SeverityNumber here, there is no point of populating it in SDK. Let the exporter decide if they need it.
Also, the field is optional as per the log data model - https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#field-severitytext
Discussion in community meeting
- Having getters for LogRecord, and make existing fields to private.
- Remove severity_text from LogRecord.