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

Add check on existing segment #376

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mathn00b
Copy link

@mathn00b mathn00b commented Aug 17, 2022

Снимок экрана 2022-08-17 в 17 25 25

Get panic when don't init new segment in grpc handler

Description of changes:

With this fix we won't get panic if forget to begin new segment in grpc handler

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

@mathn00b mathn00b requested a review from a team as a code owner August 17, 2022 14:29
Copy link

@mgerasimchuk mgerasimchuk left a comment

Choose a reason for hiding this comment

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

LGTM :)

assert.Equal(t, tc.expectedThrottle, subseg.Throttle)
assert.Equal(t, tc.expectedError, subseg.Error)
assert.Equal(t, tc.expectedFault, subseg.Fault)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the upgraded HTTP check logic and subsegment count check.

Can we have an assert in the case of seg.Subsegments == 0?

Nitpick:
can we move "var subseg *Segment" inside the "if len(seg.Subsegments) > 0 {" conditional.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mathn00b
Bumping to the top of your inbox.

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.

4 participants