Skip to content

Add Name field back to Log data model #2398

@jjharr

Description

@jjharr

This issue relates to issue 2074

I propose to add the name field back to the log data model, for the following reasons:

  1. While I realize that OpenTelemetry is not 1.0 yet, there are actually a lot of people using Open Telemetry. The recent removal of the name field hard-breaks all existing code without (as far as I can tell) a compelling reason.

  2. The original intent of the field was as a low cardinality field. This was mentioned in the discussions for issue 2074, but not really addressed adequately. My company, and some of our very large customers, use it in exactly that way. They keep a Grafana dashboard that is a histogram of error types. It is an extremely important dashboard. You can only create a histogram like that if you have a low cardinality field. This is a very broad use case. Yes, you can theoretically do that if you just keep it as an attribute, but it increases processing overhead, which matters at the volumes we deal with.

  3. Finally, and by far most importantly in the long term, this change really undermines good semantic logging patterns. We just barely, after great effort, trained our developers to use fixed strings (instead of interpolated strings) as log messages and augment those fixed strings with context-specific attributes. This pattern makes log searchability vastly better. Demoting name to an attribute completely undermines that pattern. I cannot over-emphasize how important this is. Pretty much every logging API in the world allows the developer to add a single message, and if this message is not cardinality constrained, then developers will just use interpolated strings like they always have. Nobody is going to enter a high-cardinality value and then a low cardinality one for attributes. So by demoting name to attributes, all the benefits of low-cardinality have been discarded. Since Open Telemetry is on track to become a de-facto logging standard, it is my view that by making this change, Open Telemetry is losing the opportunity to meaningfully, and positively, change how developers in next many years do their logging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec:logsRelated to the specification/logs directory

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions