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

missing Tracer. set_status/2 #311

Closed
dvic opened this issue Nov 15, 2021 · 2 comments
Closed

missing Tracer. set_status/2 #311

dvic opened this issue Nov 15, 2021 · 2 comments

Comments

@dvic
Copy link
Contributor

dvic commented Nov 15, 2021

Currently Tracer.set_status is defined as:

  @spec set_status(OpenTelemetry.status()) :: boolean()
  def set_status(status) do
    :otel_span.set_status(:otel_tracer.current_span_ctx(), status)
  end

Shouldn't this function accept an optional description message? (https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status)

@bryannaegele
Copy link
Contributor

bryannaegele commented Nov 15, 2021

@dvic you aren't allowed to set descriptions on non-error statuses. When you create an error status with an optional message, it is set appropriately on the span.

More info in #246 if you want to see the details.

@tsloughter
Copy link
Member

But also the status is a record, so you must first create the status with OpenTelemetry.status/2 and then pass it to set_status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants