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

[Bug]: Errors are not captured in trace data #43464

Closed
chathurace opened this issue Oct 7, 2024 · 2 comments · Fixed by #43558
Closed

[Bug]: Errors are not captured in trace data #43464

chathurace opened this issue Oct 7, 2024 · 2 comments · Fixed by #43558
Assignees
Labels
Priority/High Team/Observability Observability in general, Metrics, Tracing & Logging Type/Bug

Comments

@chathurace
Copy link
Contributor

Description

If an error occurs within a span, the corresponding span's state must be set to "Error" (status.code = 1). This is not done in the current implementation, which makes it impossible to track errors using trace analytics.

Steps to Reproduce

No response

Affected Version(s)

No response

OS, DB, other environment details and versions

No response

Related area

-> Observability

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@ballerina-bot ballerina-bot added the Team/Observability Observability in general, Metrics, Tracing & Logging label Oct 7, 2024
@NipunaMadhushan NipunaMadhushan self-assigned this Nov 4, 2024
@NipunaMadhushan NipunaMadhushan moved this to Planned for Sprint in Ballerina Team Main Board Nov 4, 2024
@NipunaMadhushan NipunaMadhushan moved this from Planned for Sprint to In Progress in Ballerina Team Main Board Nov 8, 2024
@NipunaMadhushan
Copy link
Contributor

NipunaMadhushan commented Nov 8, 2024

@chathurace According to the API docs in opentelemetry-api, status code can be in three stages.

UNSET - 0
OK - 1
ERROR - 2

By default, it will be 0 since we haven't set the status of the span. If the status is ERROR, the status code will be 2.

Source - https://javadoc.io/doc/io.opentelemetry/opentelemetry-api/latest/io/opentelemetry/api/trace/StatusCode.html

@NipunaMadhushan NipunaMadhushan moved this from In Progress to PR Sent in Ballerina Team Main Board Nov 8, 2024
@github-project-automation github-project-automation bot moved this from PR Sent to Done in Ballerina Team Main Board Nov 22, 2024
Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority/High Team/Observability Observability in general, Metrics, Tracing & Logging Type/Bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants