Followed this example closely
But couldn't work with this setup.
- Python v3.10.0
- Pip v21.2.3
-
Make sure it is python 3.6 or higher
python --version
-
Create virtual environment
python -m venv venv
-
Activate the virtual environment
source venv/bin/activate
-
Install
pip install 'splunk-opentelemetry[all]'
-
Install
splunk-py-trace-bootstrap
-
export OTEL_SERVICE_NAME=benz-flask-uwsgi-manu-instr
-
export OTEL_TRACES_EXPORTER="jaeger-thrift-splunk"
-
export OTEL_EXPORTER_JAEGER_ENDPOINT=https://ingest.<realm from splunk o11y>.signalfx.com/v2/trace
-
export SPLUNK_ACCESS_TOKEN=<ingest token from splunk o11y cloud>
-
Set environment name
export OTEL_RESOURCE_ATTRIBUTES=deployment.environment=jek-dev
-
Set service version
export OTEL_RESOURCE_ATTRIBUTES=service.version=99.99.99
-
View the packages before installing more
pip freeze
-
Add
pip install opentelemetry-instrumentation-flask
-
Add
pip install flask
-
Add
pip install wheel
-
Add
pip install uwsgi
-
Add
pip install flask-restful
-
Run the flask app with uwsgi using start_server.sh
-
Invoke request via http://127.0.0.1:5000/
-
Deactivate the virtual environment
deactivate