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 http ignore by method #143

Merged
merged 1 commit into from Aug 6, 2021
Merged

Add http ignore by method #143

merged 1 commit into from Aug 6, 2021

Conversation

tom-pytel
Copy link
Contributor

  • Added SW_HTTP_IGNORE_METHOD which will allow ignoring http operations by method (GET, POST, HEAD, OPTIONS, etc...)
  • Set default SW_AGENT_MAX_BUFFER_SIZE back to 10000 from 1000, which turns out to be too small for python (many unnecessarily dropped spans).

@tom-pytel tom-pytel added the feature New feature label Aug 4, 2021
@tom-pytel tom-pytel added this to the 0.7.0 milestone Aug 4, 2021
@tom-pytel
Copy link
Contributor Author

I've noticed sanic 20.3.0 test fail intermittently 2 or 3 times now...

@tom-pytel
Copy link
Contributor Author

@kezhenxu94 - Here you have a perfect case, this test for this python version passed before but failed now even though it worked before and now for other python versions. Can you have a look?

Copy link
Member

@kezhenxu94 kezhenxu94 left a comment

Choose a reason for hiding this comment

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

Will take a look at the sanic case

@tom-pytel
Copy link
Contributor Author

tom-pytel commented Aug 5, 2021

Still failing, do you have access to the logs to see why?

[EDIT] I don't mean the normal generated logs, I mean like for the consumer which seems to be failing for this particular sanic test?

@kezhenxu94
Copy link
Member

sanic test case seems to always fail in Python 3.8, need to check why

@tom-pytel
Copy link
Contributor Author

tom-pytel commented Aug 5, 2021

sanic test case seems to always fail in Python 3.8, need to check why

I did a basic check on my side with python 3.8.11 and sanic 20.3.0 and it works, (note, the exception is intentional when the server was accessed to test error):

(.venvdebug38) tom@tom-VirtualBox:~/src/revdebugpy/test-apm {master} $ python --version
Python 3.8.11
(.venvdebug38) tom@tom-VirtualBox:~/src/revdebugpy/test-apm {master} $ pip list | grep sanic
sanic              20.3.0
(.venvdebug38) tom@tom-VirtualBox:~/src/revdebugpy/test-apm {master} $ ./srv_sanic.py 
skywalking [MainThread] [WARNING] failed to install plugin sw_aiohttp
skywalking [MainThread] [WARNING] failed to install plugin sw_celery
skywalking [MainThread] [WARNING] failed to install plugin sw_django
skywalking [MainThread] [WARNING] failed to install plugin sw_elasticsearch
skywalking [MainThread] [WARNING] failed to install plugin sw_flask
skywalking [MainThread] [WARNING] failed to install plugin sw_kafka
skywalking [MainThread] [WARNING] failed to install plugin sw_psycopg2
skywalking [MainThread] [WARNING] failed to install plugin sw_pymongo
skywalking [MainThread] [WARNING] failed to install plugin sw_pymysql
skywalking [MainThread] [WARNING] failed to install plugin sw_pyramid
skywalking [MainThread] [WARNING] failed to install plugin sw_rabbitmq
skywalking [MainThread] [WARNING] failed to install plugin sw_redis
skywalking [MainThread] [WARNING] failed to install plugin sw_tornado
[2021-08-05 09:42:02 -0300] [3022510] [INFO] Goin' Fast @ http://0.0.0.0:8005
[2021-08-05 09:42:02 -0300] [3022510] [INFO] Starting worker [3022510]
[2021-08-05 09:42:04 -0300] [3022510] [ERROR] Exception occurred while handling uri: 'http://localhost:8005/error'
Traceback (most recent call last):
  File "/home/tom/src/revdebugpy/debug38/.venvdebug38/lib/python3.8/site-packages/sanic/app.py", line 973, in handle_request
    response = await response
  File "./srv_sanic.py", line 26, in error
    raise Exception('Error from Sanic!')
Exception: Error from Sanic!
[2021-08-05 09:42:04 -0300] - (sanic.access)[INFO][127.0.0.1:57966]: GET http://localhost:8005/error  500 250

@kezhenxu94
Copy link
Member

Didn't reproduce locally or in another branch https://github.com/apache/skywalking-python/runs/3252404801

@tom-pytel
Copy link
Contributor Author

20.3.0 worked this time, what did you change?

@tom-pytel
Copy link
Contributor Author

Seems to be stuck on starting CheckStatus test...

@kezhenxu94
Copy link
Member

20.3.0 worked this time, what did you change?

Didn't change anything, it seems to be unstable, not constantly fail.

@kezhenxu94
Copy link
Member

Seems to be stuck on starting CheckStatus test...

This is GitHub action issue, maybe the job is bot scheduled.

@kezhenxu94
Copy link
Member

Ok. GitHub actions is degraded. Let's merge this anyway.

@tom-pytel
Copy link
Contributor Author

tom-pytel commented Aug 5, 2021

Ok. GitHub actions is degraded. Let's merge this anyway.

Tried to merge locally and push to github master but no luck (I guess as comitter I don't have these permissions?):

tom@tom-VirtualBox:~/src/revdebugpy/skywalking-python {master} $ git push upstream
Total 0 (delta 0), reused 0 (delta 0)
remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: Required status check "CheckStatus" is cancelled.
To github.com:apache/skywalking-python.git
 ! [remote rejected] master -> master (protected branch hook declined)
error: failed to push some refs to 'git@github.com:apache/skywalking-python.git'

@tom-pytel tom-pytel mentioned this pull request Aug 5, 2021
@tom-pytel
Copy link
Contributor Author

This time sanic 20.3.0 failed for py 3.9...

@tom-pytel
Copy link
Contributor Author

Disabled sanic 20.3.0 test for now.

@kezhenxu94 kezhenxu94 merged commit 3ba6e4d into apache:master Aug 6, 2021
@kezhenxu94 kezhenxu94 changed the title add http ignore by method Add http ignore by method Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
2 participants