stuart23 commented on PR #64523: URL: https://github.com/apache/airflow/pull/64523#issuecomment-5934070402
The FastAPI framework has hooks that allow you to specify the provider used for metrics/logs/traces [here](https://fastapi.tiangolo.com/advanced/opentelemetry/#configure-providers-and-exporters). You should be able to wrap `airflow._shared.observability.metrics.stats.Stats` into a compatible provider class rather than introducing a custom middleware. This will also produce metrics according to the FastAPI semconv, rather than having to maintain a separate convention. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
