open-telemetry / open-telemetry/opentelemetry-python-contrib

Tracing not working python socketio

Open
#934 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

auto-instrumentation bug feature-request help wanted
Dominant language
Python
Stars
1.1k
Forks
1.1k
Avg merge
4d 15h
Merged PRs (30d)
16

Description

I have a Flask-socketio application which also has flask api's in it.
FlaskInstrumentor captures the api traces
I also use RequestsInstrumentor to capture the http ping-pong request generated by socketio.
But I can't see any traces generated for the socketio

app = Flask(__name__)
socket_ = SocketIO(app, path='/progress', async_mode="threading")

trace.set_tracer_provider(TracerProvider())
trace.get_tracer_provider().add_span_processor(
    BatchSpanProcessor(ConsoleSpanExporter())
)

# auto instrumentor
FlaskInstrumentor().instrument_app(app)
RequestsInstrumentor().instrument()
MySQLInstrumentor().instrument()

tracer = trace.get_tracer(__name__)

Do I have do something else below is installed pypi libraries

python-engineio==3.14.2
python-socketio==4.6.1
Flask-SocketIO==4.3.2
opentelemetry-api==1.9.1
opentelemetry-exporter-otlp==1.9.1
opentelemetry-exporter-otlp-proto-grpc==1.9.1
opentelemetry-exporter-otlp-proto-http==1.9.1
opentelemetry-instrumentation==0.28b1
opentelemetry-instrumentation-dbapi==0.28b1
opentelemetry-instrumentation-flask==0.28b1
opentelemetry-instrumentation-mysql==0.28b1
opentelemetry-instrumentation-requests==0.28b1
opentelemetry-instrumentation-wsgi==0.28b1
opentelemetry-propagator-b3==1.9.1
opentelemetry-proto==1.9.1
opentelemetry-sdk==1.9.1
opentelemetry-semantic-conventions==0.28b1
opentelemetry-util-http==0.28b1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Flask-SocketIO application with FlaskInstrumentor and RequestsInstrumentor using the versions listed in the issue, then inspect which Flask-SocketIO or socketio execution paths those instrumentors cover. Done means determining whether socketio traces are supported or identifying the missing instrumentation behavior, with the result verified through visible exported traces.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, python
Domain
backend, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.