Skip to content
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

Add SeverityNumber to Span Events #698

Conversation

tigrannajaryan
Copy link
Member

The log data model introduced the notion of SeverityNumber [1] that
can be recorded for individual log records.

I believe it is equally useful for events recorded for Spans. Adding
SeverityNumber to the Span events also makes it more uniform with
standalone log model which is aligned with our understanding that
Span events are another form of log records [2].

[1] https://github.com/open-telemetry/oteps/blob/master/text/logs/0097-log-data-model.md#field-severitynumber
[2] https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/glossary.md#embedded-log

The log data model introduced the notion of SeverityNumber [1] that
can be recorded for individual log records.

I believe it is equally useful for events recorded for Spans. Adding
SeverityNumber to the Span events also makes it more uniform with
standalone log model which is aligned with our understanding that
Span events are another form of log records [2].

[1] https://github.com/open-telemetry/oteps/blob/master/text/logs/0097-log-data-model.md#field-severitynumber
[2] https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/glossary.md#embedded-log
@tigrannajaryan tigrannajaryan requested review from a team as code owners July 10, 2020 15:28
@Oberon00
Copy link
Member

I think most events don't need a severity. Severity might be a useful general semantic convention, but I don't like a new first-class API for it. We are already having discussions about the usefulness of the status code (#306), so I'm against introducing new hard-coded fields for the span. I think we should rather try to improve the story for using semantic conventions (#547).

@carlosalberto carlosalberto added the release:after-ga Not required before GA release, and not going to work on before GA label Jul 10, 2020
@tigrannajaryan
Copy link
Member Author

I think most events don't need a severity.

I agree. However, I think the API should help the user do the right thing. In many cases (like exception recording) it is important to tell if the event is an error or no. Having this in the API encourages the user to think and define the fact that the exception is an error (or is not). Putting it in the semantic conventions creates a bigger distance and does not emphasize enough the importance of having the error flag recorded.

Severity also is a first class concept in virtually every logging library and I think we should treat the events as logs attached to spans, so the reasons why it is a good idea that severity is a first-class concept in the logging world also apply here.

I strongly believe we need a way to indicate that a Span event is an error or no. I think this is a nice way to achieve it and also provide a more granular way to specify how severe the error is.

@Oberon00
Copy link
Member

Oberon00 commented Jul 13, 2020

However, I think the API should help the user do the right thing.

Agreed. Hence my reference to the "semantic conventions as YAML" / "Typed Span" issue #547. I don't think it is the right thing to add a severity to most events.

@Oberon00
Copy link
Member

During the discussion about removing status on #706, it occurred to me that maybe we could replace status with a severity also for spans. Instead of having error=true we could have a severity of error or also warning for something like HTTP 404. This is just an idea I'm throwing out though, I'm not sure myself if it is a good one.

CC @iNikem

@iNikem
Copy link
Contributor

iNikem commented Jul 16, 2020

@Oberon00 You opposed having severity on exception event. Why do you like severity on span as a whole? :)

@Oberon00
Copy link
Member

Oberon00 commented Jul 16, 2020

I'm opposed to having it as a dedicated field, but not opposed to having it as a semantic convention. EDIT: And I was also opposed to introducing severity in the same PR as exceptions, since I wanted to keep discussion of error reporting and exception reporting separate.

@iNikem
Copy link
Contributor

iNikem commented Jul 16, 2020

@tedsuo Can you please add here your opinion/proposal about adding severity to Span.

@carlosalberto carlosalberto added spec:trace Related to the specification/trace directory area:api Cross language API specification issue labels Jul 21, 2020
@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Aug 12, 2020
@tigrannajaryan
Copy link
Member Author

@open-telemetry/specs-approvers any thoughts on this proposal?

@bogdandrutu
Copy link
Member

@tigrannajaryan I see this as a thing that we can discuss later and we can maybe add after GA, if that is not the case let me know

@tigrannajaryan
Copy link
Member Author

@tigrannajaryan I see this as a thing that we can discuss later and we can maybe add after GA, if that is not the case let me know

You are right, this is correctly labeled. If we decide to move forward with this proposal it will still be backwards compatible so no rush.

@github-actions github-actions bot removed the Stale label Aug 13, 2020
@iNikem
Copy link
Contributor

iNikem commented Aug 13, 2020

If this PR is for after GA, then by #792 it should be "postponed (by closing the PR and filing a tracking issue for the next milestone)"

@carlosalberto
Copy link
Contributor

"by closing the PR and filing a tracking issue for the next milestone" +1 on this.

@tigrannajaryan
Copy link
Member Author

If this PR is for after GA, then by #792 it should be "postponed (by closing the PR and filing a tracking issue for the next milestone)"

Sounds good to me. So this means we don't use "release:after-ga" label for PRs, right?

@Oberon00
Copy link
Member

Closing every PR if its classified after-GA seems extreme. We basically won't be accepting outside contribution.

@iNikem
Copy link
Contributor

iNikem commented Aug 13, 2020

If we have capacity to quickly decide the faith of the PR, we can do that. But if we cannot process and merge PR before GA, what's the point of having it open for months and months?

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Aug 21, 2020
@tigrannajaryan
Copy link
Member Author

Closing the PR, not actionable now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Cross language API specification issue release:after-ga Not required before GA release, and not going to work on before GA spec:trace Related to the specification/trace directory Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants