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

Setting Default ErrorStrategy to Log #382

Merged
merged 2 commits into from
Oct 25, 2022

Conversation

atshaw43
Copy link
Contributor

Issue #, if available:

Description of changes:
Setting Default ErrorStrategy to Log

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@atshaw43 atshaw43 requested a review from a team as a code owner October 21, 2022 23:15
@srprash
Copy link
Contributor

srprash commented Oct 21, 2022

@atshaw43 Will this change address this request? #334

@@ -352,6 +352,11 @@ func (seg *Segment) Close(err error) {
return
}

if seg == nil {
logger.Debugf("No input subsegment to end. No-op")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way we can delegate this situation to be handled by the ContextMissingStrategy?
This way it can be just a log or a runtime exception if a user choses to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I talked with Will in regards to its implementation in Java.

"I think that’s the expected behavior for this method. If a customer explicitly passes in the subsegment to be closed, then we shouldn’t throw context missing errors because we’re not interacting with the context, we just use the subsegment provided by the customer as noted in javadocs."

Copy link
Contributor

@srprash srprash left a comment

Choose a reason for hiding this comment

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

Thanks!

@atshaw43 atshaw43 merged commit 810ba59 into aws:master Oct 25, 2022
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

Successfully merging this pull request may close these issues.

2 participants