John White
02/20/2023, 9:56 PMFROM 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
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:
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!Srikanth Chekuri
02/20/2023, 11:51 PMWhen 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//<host ip4317> otherwise.Copy codeENV OTEL_EXPORTER_OTLP_ENDPOINT "<http://localhost:4317>"
John White
02/21/2023, 1:01 AMTransient 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.John White
02/21/2023, 1:22 AMExceptions
tab in the Signoz UI. Upon fixing this exception, then everything will show up and be tracked properly.Ankit Nayan
John White
02/22/2023, 4:51 AMJohn White
02/23/2023, 4:17 AM