-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[Bug] go agent http plugin response 500 status but not set span error #12882
Comments
@alexwn Are you going to submit a pull request to add this? I can see the status code tag is set, but no status is set. |
For now, the Go agent only sets the response status code into the span as a tag. Can you check if the tag is in the error span? Then I think we can set the error when the response status code is bigger or equals
It can be added. |
Yes, the plugin codes should be like this. The toolkit needs more changes, but still be easy. Add a method in the toolkit and add a new interceptor for that. |
There is an |
I think we should expose a new |
Sure. @alexwn would you like to fix this issue? |
ok, I'd like to try to fix it, I haven't done this before, if I have any questions, hope you can help me. -_- |
this bugfix at 0.6.0 tag. If you have any questions, you can leave a message here. |
Your codes will go straight into main branch and included in the 0.6 release after merged. |
get it |
You can add a new method interceptor following this documentation. And the toolkit-related plugin is under this directory: https://github.com/apache/skywalking-go/tree/main/plugins/toolkit-activation/trace. |
You still need to do the following things:
|
Toolkit should have test scenarios included, you could follow the docs, and add new tests for your new methods. |
Please use v4.x version of yq https://github.com/mikefarah/yq/releases. |
ok, resolved |
This is pulling docker image from github image repo(ghcr.io). Please check whether you need some proxy? |
|
Sorry, I don't know that. I don't need docker proxy. And docker.io is different from ghcr.io repo. ghcr.io is hosted by GitHub. |
I can access ghcr.io, although it's a little slow. I have pulled this image. |
If you have updated the interceptor code, I think the |
If the |
Relative PR apache/skywalking-go#212 |
Search before asking
Apache SkyWalking Component
Go Agent (apache/skywalking-go)
What happened
The HTTP request returns a status code of 4xx or 5xx, but the span is not marked as an error in the Skywalking UI
What you expected to happen
How to reproduce
Use the native HTTP server of Go to process requests. When the HTTP status returned by the request is 4xx or 5xx, span will not be marked as an error
Anything else
No response
Are you willing to submit a pull request to fix on your own?
Code of Conduct
The text was updated successfully, but these errors were encountered: