Auto-instrumentation gives 0x00000...
traces and spans; no metrics at all.
#2079
Labels
bug
Something isn't working
0x00000...
traces and spans; no metrics at all.
#2079
Summary
Following the OpenTelemetry docs for auto-instrumenting a Python service, the auto-instrumentation fails to export traces and metrics.
Environment
FROM ubuntu:latest
, see Additional Context at bottom for details.Reproduction instructions
Make a simple Flask app, run it, send HTTP requests, and observe OpenTelemetry output in the console.
Setup Python virtual env & dependencies
Create a virtual environment and install both web-server and instrumentation dependencies by running this:
Simple Flask app
Copy this into
app.py
:Run the web server
Run the tiny Flask app with OpenTelemetry auto-instrumentation as follows:
Notice that it should automatically export three things to the console: traces, metrics, and logs.
Observe the output
See "Actual behavior" section below for observed console output.
Expected behavior
As shown in the OpenTelemetry Python docs, the expected console output is (reproduced here):
of course with the endpoint and service name defined in
app.py
above rather than "rolldice". Moreover the telemetry.sdk.version etc. are as in the Environment section above.Additionally, I expect to observe metrics output, especially the latency histogram (details in docs linked above).
Actual behavior
Instead of producing output indicating OpenTelemetry registered the index endpoint
/
successfully, there is no such information in the console output. Moreover, the traces and spans are0x000...
uniformly. Moreover, there are no metrics exported to the console.The console output is as follows:
After the startup behavior (
* Debug mode: off \n ...
and the first two messages) each request against the app is logged identically to the final message above (with timestamp changing, all else identical).Additional context
Log levels
Neither using
logger.warning
norraise Exception
changes the above behavior - these are logged with0x000...
trace and span identities. The severity_text and severity_number are recorded correctly.Docker
You can also reproduce this result in Docker, please see the following Dockerfile for ease of reproduction:
and note that the
run.sh
is the following:^ you will need to
chmod +x run.sh
.The text was updated successfully, but these errors were encountered: