https://signoz.io logo
#general
Title
# general
m

Manikandan Swaminathan

01/25/2023, 2:53 PM
Hi, very new to this ecosystem. I am struggling to get a basic fastapi instrumentation up with the automatic instrumentation command, even a basic console export is not working, here is the command I supplied:
opentelemetry-instrument --traces_exporter console --metrics_exporter console $APP_CMD
The $APP_CMD is just using uvicorn to run the app without hot reload as advised.
s

Srikanth Chekuri

01/25/2023, 2:54 PM
What does the $APP_CMD look like? Multiple workers are not supported (yet) by opentelemetry.
m

Manikandan Swaminathan

01/25/2023, 3:03 PM
No just one teeny tiny worker
uvicorn main:app --app-dir /my_service --host 0.0.0.0 --port 3000
s

Srikanth Chekuri

01/25/2023, 3:04 PM
What’s the output of
python -m pip freeze
?
m

Manikandan Swaminathan

01/25/2023, 3:05 PM
ill try that now
and report
alembic==1.7.7 anyio==3.6.2 asgiref==3.6.0 attrs==22.2.0 auth0-python==3.24.0 backoff==2.2.1 certifi==2022.12.7 cffi==1.15.1 charset-normalizer==2.1.1 click==8.1.3 coverage==6.5.0 cryptography==39.0.0 Deprecated==1.2.13 dnspython==2.3.0 email-validator==1.3.1 fastapi==0.88.0 googleapis-common-protos==1.58.0 greenlet==2.0.1 grpcio==1.51.1 h11==0.14.0 httpcore==0.16.3 httpx==0.23.1 idna==3.4 iniconfig==2.0.0 isort==5.10.1 Mako==1.2.4 MarkupSafe==2.1.2 opentelemetry-api==1.15.0 opentelemetry-distro==0.36b0 opentelemetry-exporter-otlp==1.15.0 opentelemetry-exporter-otlp-proto-grpc==1.15.0 opentelemetry-exporter-otlp-proto-http==1.15.0 opentelemetry-instrumentation==0.36b0 opentelemetry-instrumentation-asgi==0.36b0 opentelemetry-instrumentation-aws-lambda==0.36b0 opentelemetry-instrumentation-dbapi==0.36b0 opentelemetry-instrumentation-fastapi==0.36b0 opentelemetry-instrumentation-grpc==0.36b0 opentelemetry-instrumentation-logging==0.36b0 opentelemetry-instrumentation-psycopg2==0.36b0 opentelemetry-instrumentation-requests==0.36b0 opentelemetry-instrumentation-sqlalchemy==0.36b0 opentelemetry-instrumentation-sqlite3==0.36b0 opentelemetry-instrumentation-tortoiseorm==0.36b0 opentelemetry-instrumentation-urllib==0.36b0 opentelemetry-instrumentation-urllib3==0.36b0 opentelemetry-instrumentation-wsgi==0.36b0 opentelemetry-propagator-aws-xray==1.0.1 opentelemetry-proto==1.15.0 opentelemetry-sdk==1.15.0 opentelemetry-semantic-conventions==0.36b0 opentelemetry-util-http==0.36b0 packaging==23.0 pluggy==1.0.0 protobuf==4.21.12 psycopg2==2.9.5 py==1.11.0 pycparser==2.21 pydantic==1.10.2 PyJWT==2.5.0 pytest==7.1.3 python-dotenv==0.21.0 requests==2.28.1 rfc3986==1.5.0 sniffio==1.3.0 SQLAlchemy==1.4.46 starlette==0.22.0 tomli==2.0.1 types-cryptography==3.3.23.2 typing_extensions==4.4.0 urllib3==1.26.14 uvicorn==0.18.3 wrapt==1.14.1
I also run opentelemetry bootstrap --action=install before the instrument command
s

Srikanth Chekuri

01/25/2023, 3:10 PM
it should work, are no spans being written to console when you send requests to this app?
m

Manikandan Swaminathan

01/25/2023, 3:10 PM
Yeah, none
Might sound silly but is there something I need to add to the app itself ? Like instrument_app by importing the sdk
s

Srikanth Chekuri

01/25/2023, 3:13 PM
That’s not really needed, can you share a simple reproducible app?
m

Manikandan Swaminathan

01/25/2023, 3:15 PM
I actually run it in docker, maybe if you reckon the config is fine so far, Ill probably tear down the whole thing rebuild it to see if it persists and if it does, will I share reproducible app?
s

Srikanth Chekuri

01/25/2023, 3:16 PM
Yes, please do.
m

Manikandan Swaminathan

01/25/2023, 3:17 PM
Thanks a mil for your response
SigNoz is dope btw! Great idea
I can confirm its a docker cache issue, it works fine now, thank you very much Srikanth!
@Srikanth Chekuri
s

Srikanth Chekuri

01/25/2023, 3:42 PM
👍
3 Views