Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

Conversation

@Luckyboys
Copy link
Contributor

In the tracer CreateExitSpanWithContext function, when the context is not a sample in this time, it
will be return a "span type is wrong" error.

Because trying to check the span is NoopSpan when after called CreateLocalSpan function, the convertion is expected a struct value.

But actual, the CreateLocalSpan function return a Span is a interface type, a interface type is a pointer in golang.

So we need to change the convertion to expect a pointer of NoopSpan type.

fix #113

…ontext not to be sampled

In the tracer CreateExitSpanWithContext function, when the context not to be sample in this time, it
will be return a "span type is wrong" error.

Because trying to check the span is NoopSpan when after called CreateLocalSpan function, the convertion is expected a struct value.

But actual, the CreateLocalSpan function return a Span is a interface type, a interface type is a pointer in golang.

So we need to change the convertion to expect a pointer of NoopSpan type.

fix SkyAPM#113
@wu-sheng wu-sheng added the bug Something isn't working label Nov 17, 2021
@Luckyboys
Copy link
Contributor Author

@arugal Please review this fix, thank you

@wu-sheng wu-sheng added this to the 1.3.0 milestone Nov 17, 2021
Copy link
Member

@kagaya85 kagaya85 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution :)

Copy link
Member

@rainbend rainbend left a comment

Choose a reason for hiding this comment

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

LGTM

@rainbend rainbend merged commit ff3fce8 into SkyAPM:master Nov 17, 2021
@Luckyboys Luckyboys deleted the hotfix-non-sample-create-exit-span-error branch November 18, 2021 02:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NewExitSpan--err is span type is wrong

4 participants