Hi guys, when I run my fastapi application via doc...
# support
f
Hi guys, when I run my fastapi application via docker run command, the signoz is able to show the app and opentelemetry metrics but when I run it via docker-compose the doesn't appear there. can anyone help me in this? Docker run command:
Copy code
docker run -d --name test-1 --net clickhouse-setup_default --env-file env_files/.env -p 3000:3000 test-image
Docker compose file:
Copy code
version: "3"

services:
  web:
    restart: unless-stopped
    build: .
    command: bash -c "OTEL_RESOURCE_ATTRIBUTES=service.name=testapp OTEL_EXPORTER_OTLP_ENDPOINT=<http://clickhouse-setup_otel-collector_1:4317> opentelemetry-instrument uvicorn app.main:app --host 0.0.0.0 --port 3000 --reload"

    volumes:
      - .:/code
    ports:
      - "3000:3000"
    env_file:
      - ./env_files/.env
    networks:
      - clickhouse-setup_default
networks:
    clickhouse-setup_default:
      external: true
s
Copy code
OTEL_EXPORTER_OTLP_ENDPOINT=<http://clickhouse-setup_otel-collector_1:4317>
This is probably incorrect. Please make sure n/w stuff is correct.
f
Acc to this documentation: https://signoz.io/blog/opentelemetry-fastapi/ if we run signoz in via docker-compose then
Copy code
OTEL_EXPORTER_OTLP_ENDPOINT=<http://clickhouse-setup_otel-collector_1:4317>
s
Can you remove --reload and check?
f
thank you @Srikanth Chekuri, yes that was the issue.