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

Make plugin compatible with Django < 2.2 #52

Merged
merged 1 commit into from
Jul 27, 2020
Merged

Make plugin compatible with Django < 2.2 #52

merged 1 commit into from
Jul 27, 2020

Conversation

Humbertzhang
Copy link
Member

No description provided.

@kezhenxu94 kezhenxu94 added enhancement New feature or request plugin Plugin labels Jul 26, 2020
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.

LGTM, thanks

@kezhenxu94 kezhenxu94 added this to the 0.3.0 milestone Jul 27, 2020
@kezhenxu94 kezhenxu94 changed the title make plugin compatible with Django < 2.2 Make plugin compatible with Django < 2.2 Jul 27, 2020
@kezhenxu94 kezhenxu94 merged commit 588b3f7 into apache:master Jul 27, 2020
kezhenxu94 pushed a commit that referenced this pull request Aug 3, 2020
author zkscpqm <qmcpzks@naver.com> 1595084266 +0300
committer kezhenxu94 <kezhenxu94@163.com> 1596458512 +0800
gpgsig -----BEGIN PGP SIGNATURE-----

 iQIzBAABCAAdFiEE/Eo3KEa/qP7Oqvu/Ng+pfz8mM0wFAl8oBhAACgkQNg+pfz8m
 M0y/bBAAoBBwE54/GJ00JQ8tgn5xqNo1bfqlBcNa6obvXJbkvFwt/knVEU+fuKxm
 p/jGahr2EyHzhXTh4XUo5xxlK+xgTid5JHRopjgTY3MgbEG/397tcS2+1P8NQUCB
 Lh+OxX5V4Gm0GqvFP02zrsHjBiJYL1TVz4R8PomuE+w7fuNyuqPtNMUt5ILsZz/3
 X3X7JJnbJqjKK5fEcerPKPUL3Ee+muazoCuR5KFGJ6PbxrVu/YBG3UTTeOhVonOb
 r7VKicGJSKQZD3nCH8cE56Qwt3uoQE1W0lQ/L1RwE++ixa+vk19FpPlwoup/eYac
 vYTGjMSgloCpiksGmhLhPU5bOlMxoArqJQg2zHayPfrdFNfgu1qfu+fMciU+8A11
 OxhLEjLxAnlEO7wtjcUuVD+siVlmkKeRBxffsoiZTXWFQVbbNnM9Sgrc70ql9KwK
 uCi3Bcfr2gJctC+vrHEBO2AJX4HtSuhYtpGzKAPc0SHb2niKqqFFZHWa+t5db7zg
 ixxUrT5j9OSAi4TzDi4/QLEjCt0ECOxJJpeUFMXn4SLHYiSaU5lgV+H5VOxEKotj
 w3dpHU1J1/mylZ9TauFX703vIc/il8iqKeqc0JFgSa25F0ZjlyfI8MIkwfHA8CNS
 MTMjnwmcDpOgc/AADPqAz+kwLYLARlvBUkz5uhwqI8slXkpwnrY=
 =4v88
 -----END PGP SIGNATURE-----

Created venv builders for linux/windows and req flashers + use documentation (#38)

* Created venv builders for linux/windows and req flashers + use documentation

* aadd license headers to scripts

* moved scripts, updated paths, changed how reqs are installed, updated linux venv bin path

* update license checker to accomodate for shebangs and batchfile comments

Add ability to collect SQL Parameters in PyMsql plugin (#39)

Add plugin for Django Agent (#37)

Add ignore_suffix Config (#40)

Add Django in document (#42)

Add Flask Http Params (#43)

* Add Flask Http Params

* Add Flask Http Params

Co-authored-by: huawei <huawei@bit-s.cn>

Add Redis Plugin (#44)

Update Redis plugin Component Id (#45)

Test: print the diff list when validation failed (#46)

feature: add Tornado Plugin (#48)

feature: add Kafka Plugin (#50)

Enable Django collect http parameters (#49)

Add changelog for 0.2.0 (#51)

Make plugin compatible with Django < 2.2 (#52)

Add Rabbitmq Plugin (#53)

chore: add make goal to package release tar ball (#54)

Support propagating correlation context (#55)

Sync

Add changelog for 0.2.0 (#51)

Make plugin compatible with Django < 2.2 (#52)

Add Rabbitmq Plugin (#53)

chore: add make goal to package release tar ball (#54)

Support propagating correlation context (#55)

Sync
@shuguang-dong
Copy link

I just tried Djano==3.1 and apache-skywalking==0.2.0,when I use cmd "python3 test_django.py runserver 0.0.0.0:9090",only use http protocol can work well,grpc protocol can't work.
But I have another question:
I only request such as start with 'http://0.0.0.0:9000/uri' agent is work well. But my django server is run with 0.0.0.0:8000.I request my django server ,agent still now work.I think agent server and my django server is uncommitted, Am i wrong?

@shuguang-dong
Copy link

I also try set agent code in settings.py,but when I start my django server ,it will throw exception: raise RuntimeError('the agent can only be started once'). So, I want use agent to listen my django server,what should I do? thank you very much!

@kezhenxu94
Copy link
Member

@shuguang-dong please provide a demo project to help us reproduce, you have so many different ports in the comment, 9090, 8000, 9000, I'm wondering whether you mess things up locally, anyway, please provide a reproducible demo project

@Humbertzhang
Copy link
Member Author

The agent can only be started once, you just need to find a place, import skywalking and use agent.start() to start it. i think maybe you use agent.start() twice when you run your app.

from skywalking import agent, config
config.service_name = "test"
config.logging_level = "DEBUG"
agent.start()

@shuguang-dong
Copy link

Hold on pelase.I provide my demo project after

@shuguang-dong
Copy link

Hello, here is my demo project: https://github.com/shuguang-dong/demo
I use cmd: python3 agent.py runserver 0.0.0.0:9090
after I visit url: http://0.0.0.0:9090/index ,agent work well(on protocol='http')
but I run my django server ,it listen 8000 port, I visit url http://127.0.0.1:8000/ , the agent not trace this request

@kezhenxu94
Copy link
Member

@shuguang-dong thanks for providing the demo, we'll take a look soon

@Humbertzhang
Copy link
Member Author

when you run python3 agent.py runserver 0.0.0.0:9090, it just start a django server with skywalking.
There's no need for you to run another django app.

@shuguang-dong
Copy link

But my backend server is run with 8000,how can I use agent to listen 8000 prot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin Plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants