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

Spec Conformance Review: Span Set Status #1641

Closed
2 tasks done
MrAlias opened this issue Mar 4, 2021 · 1 comment
Closed
2 tasks done

Spec Conformance Review: Span Set Status #1641

MrAlias opened this issue Mar 4, 2021 · 1 comment
Assignees
Labels
area:trace Part of OpenTelemetry tracing
Milestone

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Mar 4, 2021

  • Review SetStatus operation for a Span and identify all normative requirements it contains.
  • Validate our implementation of the specification to conform or not. If it conforms, document the conformity here. If it does not open an Issue or PR track the work.
@MrAlias MrAlias added the area:trace Part of OpenTelemetry tracing label Mar 4, 2021
@MrAlias MrAlias self-assigned this Mar 5, 2021
@MrAlias
Copy link
Contributor Author

MrAlias commented Mar 5, 2021

SetStatu

Status is structurally defined by the following properties:

  • StatusCode, one of the values listed below.
  • Optional Description that provides a descriptive message of the Status.
    Description MUST only be used with the Error StatusCode value.

We need to not set the description if not Error

StatusCode is one of the following values:

  • Unset
    • The default status.
  • Ok
    • The operation has been validated by an Application developer or Operator to have completed successfully.
  • Error
    • The operation contains an error.

Our codes conform

The Span interface MUST provide:

  • An API to set the Status.
    This SHOULD be called SetStatus.
    This API takes the StatusCode, and an optional Description, either as individual parameters or as an immutable object encapsulating them, whichever is most appropriate for the language.
    Description MUST be IGNORED for StatusCode Ok & Unset values.

We need to ignore the description if not Error

The status code SHOULD remain unset, except for the following circumstances:

When the status is set to ERROR by Instrumentation Libraries, the status codes SHOULD be documented and predictable.
The status code should only be set to ERROR according to the rules defined within the semantic conventions.
For operations not covered by the semantic conventions, Instrumentation Libraries SHOULD publish their own conventions, including status codes.
Generally, Instrumentation Libraries SHOULD NOT set the status code to Ok, unless explicitly configured to do so.
Instrumention libraries SHOULD leave the status code as Unset unless there is an error, as described above.
Application developers and Operators may set the status code to Ok.
Analysis tools SHOULD respond to an Ok status by suppressing any errors they would otherwise generate.
For example, to suppress noisy errors such as 404s.
Only the value of the last call will be recorded, and implementations are free to ignore previous calls.

These requirements are for instrumentors, but as a sanity check:

@MrAlias MrAlias closed this as completed Mar 5, 2021
@pellared pellared added this to the untracked milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:trace Part of OpenTelemetry tracing
Projects
None yet
Development

No branches or pull requests

2 participants