[UvicornAppHostingExtension] Uvicorn for FastAPI with Opentelemetry does not work : err message is No such option: --traces_exporter
#457
-
Hello~ I tried using the community extension to host a Uvicorn app with Aspire.AppHost. However, I ran into the following issue. Does anyone know how to resolve it? What I want to do :
Symptoms :
How to represent
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hi~ Happy weekends~ |
Beta Was this translation helpful? Give feedback.
-
little updates! var pythonApp = builder.AddPythonApp(
name: "python",
projectDirectory: "../Python.FastAPI",
scriptPath: "app.py",
scriptArgs: new[] {""}
)
.WithHttpEndpoint(
targetPort:portValueInt,
port:portValueInt+1)
.WaitFor(rabbitMQContainer)
.WaitFor(postgresqlContainer); |
Beta Was this translation helpful? Give feedback.
-
Hi @tae0y. I can confirm there's a bug here. As of today, when OTEL is enabled, we generate a command such as uvicorn app:app --traces_exporter otlp --logs_exporter console,otlp --metrics_exporter otlp while it should really be opentelemetry-instrument --traces_exporter otlp --logs_exporter console,otlp --metrics_exporter otlp uvicorn app:app I'll fire up a PR to solve this. |
Beta Was this translation helpful? Give feedback.
-
FYI: #472 |
Beta Was this translation helpful? Give feedback.
FYI: #472