pacific28 commented on issue #8566:
URL: https://github.com/apache/skywalking/issues/8566#issuecomment-1137017661

   Hi @Superskyyy 
   I'm trying to run a Django application with gunicorn. It is unable to start 
the agent. I followed this thread and 
https://opentelemetry-python.readthedocs.io/en/latest/examples/fork-process-model/README.html
   
   Here is my wsgi.py
   
   ```
   import os
   
   from django.core.wsgi import get_wsgi_application
   
   
   from uwsgidecorators import postfork
   from skywalking import agent, config
   
   def post_fork(server, worker):
       print("abc")
       config.init(collector_address='xxxxx', service_name='test-1')
       agent.start()
   
   os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings")
   
   application = get_wsgi_application()
   
   
   ```
   this is the command to start the application
   **gunicorn myproject.wsgi --workers 2**
   
   Any suggestions.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to