You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "changlongmao (via GitHub)" <gi...@apache.org> on 2023/06/28 07:46:49 UTC

[GitHub] [skywalking] changlongmao opened a new issue, #11011: Skywalking 忽略特定的 http.status_code 错误

changlongmao opened a new issue, #11011:
URL: https://github.com/apache/skywalking/issues/11011

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Description
   
   The error codes related to 401 and 400 permissions in http requests are business errors, and you need to customize and specify to ignore errors, otherwise the service success rate will be very low, and frequent alarms. You have provided an ignore endpoint path, and @IgnoreException ignores custom exceptions. Works great for me, but ignore errors cannot be specified for http.status_code
   
   ### Use case
   
   The ignored http status code can be specified in the skywalking-agent configuration file, or can be configured in the application.yml file in oapserver
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng closed issue #11011: Skywalking 忽略特定的 http.status_code 错误

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng closed issue #11011: Skywalking 忽略特定的 http.status_code 错误
URL: https://github.com/apache/skywalking/issues/11011


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #11011: Skywalking 忽略特定的 http.status_code 错误

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1610934984

   We only accept English on github discussion.
   And according to HTTP spec, 4xx is not business exception. We would accept this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Skywalking ignore specific http.status_code [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1870918667

   You need to check the plugin codes. The status is declared by the plugin.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Skywalking ignore specific http.status_code [skywalking]

Posted by "Karl-Sparticle (via GitHub)" <gi...@apache.org>.
Karl-Sparticle commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1871019065

   > You need to check the plugin codes. The status is declared by the plugin.
   
   Sorry,  I don't understand which plugin codes should be checked.
   
   I am using sw in k8s. like this:
   ![image](https://github.com/apache/skywalking/assets/95554023/7939c179-1805-4f9e-b9db-31d191eea6fd)
   ![image](https://github.com/apache/skywalking/assets/95554023/87a80a37-64e7-4b68-a139-96b7c5bfd563)
   
   
   Do I need to modify the code of [skywalking agent ](https://github.com/apache/skywalking-java)?
   Then to build an new image and use it?
   
   It doesn't seem easy.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Skywalking ignore specific http.status_code [skywalking]

Posted by "Karl-Sparticle (via GitHub)" <gi...@apache.org>.
Karl-Sparticle commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1871670096

   > `> 400` is hard coded in the SpringMVC plugin(I assume for many other plugins as well)
   > 
   > Check this about codes https://github.com/apache/skywalking-java/blob/4f2f81e1819755d0d18d1453297142f0a7b0416a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java#L249-L254
   
   It seems that as long as the status code`>=400`, an error will be reported
   
   I think it is normal for a user to use an expired token to access the server and the server should return 401(event 4xx).
   
   
   Is it possible for the community to make modifications?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Skywalking ignore specific http.status_code [skywalking]

Posted by "Karl-Sparticle (via GitHub)" <gi...@apache.org>.
Karl-Sparticle commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1871682325

   Nice!
   
   To configurate the expiression is indeed a better way.
   
   I will learn the usage of expression.
   
   Many Thanks. @wu-sheng @Superskyyy 
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Skywalking ignore specific http.status_code [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1871672640

   This isn't easy to change. I believe most of the plugins are following this `>=400`===`status=false` logic. So, changing one is going to make codes inconsistent.
   
   Meanwhile, I believe you could change the metric expression from OAL. The reason for the statistic for success rate is this
   
   https://github.com/apache/skywalking/blob/ce5d6a4ffb1b9631452f1fcd0eaa15450cd7302b/oap-server/server-starter/src/main/resources/oal/core.oal#L21
   
   You could change this line to calculate the success rate through response codes
   
   > service_sla = from(Service.*).percent(httpResponseStatusCode in [500, 503];
   
   Notice, I am referring to doc only only, https://skywalking.apache.org/docs/main/next/en/concepts-and-designs/oal/. You could learn from there.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Skywalking ignore specific http.status_code [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1871020430

   Which component does your span say? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #11011: Skywalking 忽略特定的 http.status_code 错误

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1610975218

   There isn't. We follow spec rather than any private solutions.
   Otherwise, the arguments from thousands of end users never end. Every company has their own protocols.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Skywalking ignore specific http.status_code [skywalking]

Posted by "Karl-Sparticle (via GitHub)" <gi...@apache.org>.
Karl-Sparticle commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1871034885

   > Which component does your span say?
   
   Are you referring to this?
   ![image](https://github.com/apache/skywalking/assets/95554023/079d51f5-8a09-4572-b517-eeed3201e14a)
   
   do i need to set something in skywalking ui or install a certain plugin for skywalking ui?
   
   I want to exclude those with an HTTP status of 4xx.
   These data should not be displayed or used for statistics.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] changlongmao commented on issue #11011: Skywalking 忽略特定的 http.status_code 错误

Posted by "changlongmao (via GitHub)" <gi...@apache.org>.
changlongmao commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1610972429

   Even though 4xx is not considered a business exception, we would still like you to provide a similar solution like "trace.ignore_path" to ignore HTTP status code errors. I would like to know if you have any solutions currently available to ignore specific HTTP status code errors.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Skywalking ignore specific http.status_code [skywalking]

Posted by "Karl-Sparticle (via GitHub)" <gi...@apache.org>.
Karl-Sparticle commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1870883018

   > We only accept English on github discussion. And according to HTTP spec, 4xx is not business exception. We would accept this.
   
   Hi wu-sheng,
   I found that this would be treated as an error if the server returns 402.
   Is this normal?
   
   ![image](https://github.com/apache/skywalking/assets/95554023/e9b3f6b4-6aba-4e34-a9e7-ecc66854eb7b)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Skywalking ignore specific http.status_code [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1871674138

   If the above option fails somehow, at least, you could have the count for your error
   
   ```
   // Calculate the sum of response code in [404, 500, 503], for each service.
   endpoint_abnormal = from(Endpoint.*).filter(httpResponseStatusCode in [500, 503]).count();
   endpoint_count = from(Endpoint.*).count();
   ```
   
   Then set up the configuration of the expression as `endpoint_abnormal / endpoint_count` on UI edit mode. This could run the calculation on-demand. UI expression doc, https://skywalking.apache.org/docs/main/v9.7.0/en/api/metrics-query-expression/
   
   ___
   
   SkyWalking metrics calculation is very flexible nowadays, you could learn more from the docs


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Skywalking ignore specific http.status_code [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1871116074

   `> 400` is hard coded in the SpringMVC plugin(I assume for many other plugins as well)
   
   Check this about codes
   https://github.com/apache/skywalking-java/blob/4f2f81e1819755d0d18d1453297142f0a7b0416a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java#L249-L254


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Skywalking ignore specific http.status_code [skywalking]

Posted by "Superskyyy (via GitHub)" <gi...@apache.org>.
Superskyyy commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-1871672496

   > > `> 400` is hard coded in the SpringMVC plugin(I assume for many other plugins as well)
   > > Check this about codes [apache/skywalking-java@`4f2f81e`/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java#L249-L254](https://github.com/apache/skywalking-java/blob/4f2f81e1819755d0d18d1453297142f0a7b0416a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java#L249-L254)
   > 
   > It seems that as long as the status code`>=400`, an error will be reported
   > 
   > I think it is normal for a user to use an expired token to access the server and the server should return 401(event 4xx).
   > 
   > Is it possible for the community to make modifications?
   
   It is up to customization and should be kept in a case by case manner (not upstream), some applications will consider this as an normal situation but some business requirements will argue it is indeed an error. So either way you need to modify the plugin code/propose to implement the ignore mechanism to fit the needs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Skywalking ignore specific http.status_code [skywalking]

Posted by "Anandraj2024 (via GitHub)" <gi...@apache.org>.
Anandraj2024 commented on issue #11011:
URL: https://github.com/apache/skywalking/issues/11011#issuecomment-2567361447

   after installing skywalking using docker compose i am getting following error in backend
   **Status: 400
   Description: Bad Request**
   UI trying to restarting the container
   please help me how to fix this
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org