Hi team, I have followed this <tutorial> with and ...
# support
j
Hi team, I have followed this tutorial with and have tried instrumenting a flask app with the following Dockerfile and docker-compose.yaml:
Copy code
FROM python:3.7
ADD requirements.txt /app/requirements.txt
WORKDIR /app/
ENV PYTHONPATH "${PYTHONPATH}:/q_pack"

RUN pip install -r requirements.txt

ENV OTEL_RESOURCE_ATTRIBUTES "service.name=dashApp"
ENV OTEL_EXPORTER_OTLP_ENDPOINT "<http://localhost:4317>"
RUN ["opentelemetry-bootstrap", "--action=install"]
CMD ["opentelemetry-instrument", "python", "./index.py","--host=0.0.0.0"]
and
Copy code
dash:
        container_name: "dash"
        build:
            context: ./dockerfiles/dockerfile_dash
        # restart: on-failure
        ports:
            - 8050:8050
            - "5001:5001" # app(debug) port
            - "3000:3000" # remote debugger attach port
        depends_on:
            - postgres
        volumes:
            - ./Storage/dash:/app
            - ./Storage/q_pack:/q_pack
        environment: 
            - FLASK_APP=app.py
            - FLASK_ENV=development
however, I get the following error:
Copy code
An instrument with name http.server.active_requests, type UpDownCounter, unit requests and description measures the number of concurrent HTTP requests that are currently in-flight has been created already.

An instrument with name http.server.duration, type Histogram, unit ms and description measures the duration of the inbound HTTP request has been created already.

Transient error StatusCode.UNAVAILABLE encountered while exporting metrics, retrying in 1s.

Transient error StatusCode.UNAVAILABLE encountered while exporting metrics, retrying in 2s.
Additionally, flask is ran with:
app.run(host='0.0.0.0', port=8050, debug=True, use_reloader=False)
from the blog. Am I missing something in the
otel-collector-*.yml
files? Thank you!
s
Copy code
ENV OTEL_EXPORTER_OTLP_ENDPOINT "<http://localhost:4317>"
When running the app inside the container, you need to ensure the endpoint where SigNoz is receiving the data is set correctly. This expects the receiver within the container and fails, as the output shows. It is either http://otel-collector:4317 if this dashApp runs as a part of the same n/w or http//&lt;host ip4317> otherwise.
j
Ah, I see! Thank you! So the
Transient error StatusCode.UNAVAILABLE encountered while exporting metrics, retrying in 1s.
error is now gone. However, the "...has been created already" logs is still appearing in the dash container. Additionally, no services is appearing in the Signoz UI even after sending requests in the dash app.
Interesting! If there's an 500 error exception in the instrumented app, services won't load into Signoz. Instead it will show in the
Exceptions
tab in the Signoz UI. Upon fixing this exception, then everything will show up and be tracked properly.
a
@John White services should be listed even if they throw 5xx exceptions. @Vishal Sharma should be able to dig deeper if you are available for a call sometime
j
Sounds good to me! I'll reach out to Vishal to see if we can put something on our calendars. Thank you for your support.
Just got off a call with @Vishal Sharma. He was a pleasure to interact with and supported me very well. Thank you again 🙂