Skip to content

Add check on existing segment#376

Open
mathn00b wants to merge 2 commits intoaws:masterfrom
mathn00b:fix/unary_client_interceptor
Open

Add check on existing segment#376
mathn00b wants to merge 2 commits intoaws:masterfrom
mathn00b:fix/unary_client_interceptor

Conversation

@mathn00b
Copy link
Copy Markdown

@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
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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