Open horw opened 2 months ago
I have added a simple middleware in FastAPI and this has created a strange span, which you can see in the image.
I have used the following middleware.
@app.middleware("http") async def hello(request: Request, call_next): resp = await call_next(request) return resp
How can I create middleware that will not create a new span? Or at least without warning clock skew adjustment disabled; not applying calculated delta of -5.163065ms ?
clock skew adjustment disabled; not applying calculated delta of -5.163065ms
https://github.com/open-telemetry/opentelemetry-python-contrib/blob/60fb936b7e5371b3e5587074906c49fb873cbd76/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py#L198
Why is this strange? If this for the multiple spans on POST handling I think we already have an issue for that.
I have added a simple middleware in FastAPI and this has created a strange span, which you can see in the image.
I have used the following middleware.
How can I create middleware that will not create a new span? Or at least without warning
clock skew adjustment disabled; not applying calculated delta of -5.163065ms
?https://github.com/open-telemetry/opentelemetry-python-contrib/blob/60fb936b7e5371b3e5587074906c49fb873cbd76/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py#L198