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

Instrumentation: fix log trace inconsistent status code with error result chaining #15122

Closed

Conversation

1pkg
Copy link
Member

@1pkg 1pkg commented Jan 3, 2025

Motivation/summary

This fix is branched from #15117.

This PR introduces additional error request.Result chaining for secondary errors that can happen after the response has already been written e.g. timeout or panic. The rationale behind this change to create an ability to pass multiple errors in the result object so they could be eventually logged while maintaining original response.

As a result of this changes self instrumentation transaction will always contain original error, while logging middleware will log both the original error and the secondary timeout error.

This is alternative to errors chaining PR #15123 which will use single error depending on when timeout happened.

Checklist

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

Related issues

#15123
#15117
#14232

@1pkg 1pkg self-assigned this Jan 3, 2025
@1pkg 1pkg requested a review from a team as a code owner January 3, 2025 23:42
Copy link
Contributor

mergify bot commented Jan 3, 2025

This pull request does not have a backport label. Could you fix it @1pkg? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-7.17 is the label to automatically backport to the 7.17 branch.
  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.
  • backport-8.x is the label to automatically backport to the 8.x branch.

Copy link
Contributor

mergify bot commented Jan 3, 2025

backport-8.x has been added to help with the transition to the new branch 8.x.
If you don't need it please use backport-skip label.

@mergify mergify bot added the backport-8.x Automated backport to the 8.x branch with mergify label Jan 3, 2025
@1pkg 1pkg added backport-8.16 Automated backport with mergify backport-8.17 Automated backport with mergify labels Jan 4, 2025
Copy link
Member

@carsonip carsonip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this looks like an overkill which further complicates a part that is already failing due to its complexity. Let's work on #15123

@1pkg
Copy link
Member Author

1pkg commented Jan 6, 2025

I agree that this looks like an overkill which further complicates a part that is already failing due to its complexity. Let's work on #15123

I agree, that this approach introduces too much complexity for a little benefit.

@1pkg
Copy link
Member Author

1pkg commented Jan 6, 2025

Closing this in favor of simple timeout check version from #15123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify backport-8.16 Automated backport with mergify backport-8.17 Automated backport with mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants