Open macieyng opened 1 year ago
@jeremydvoss
@macieyng It's very interesting as extention. Have you finally find a solution for this problem?
Thank you
Well. Right now we're using it in production with some minor changes for almost two months. It works as expected. Some issues was discovered, because we had implemented a distributed tracing (we also have internal tracing for finding more specific issues).
We have our internal library and I've wrapped this and OpenCensusExtension in configure_tracing()
function that uses Azure SDK env variable AZURE_SDK_TRACING_IMPLEMENTATION
to detect which tracing library should be used - this was done mainly for smooth transition from OC to OTEL.
If you need something that just works, you can easily take this example as is (probably minor changes will be required) and slap it into your codebase.
If you have any specific question feel free to ask.
In case someone looks for an e2e sample, I have implemented this in a similar manner in this repository with opentelemetry
and fastapi
: https://github.com/PerfectThymeTech/AzureFunctionPython/blob/main/code/function/wrapper/__init__.py
The difference is that I have included the opentelemetry
setup in the fastapi
app startup instead of using an Azure Function Extension. I prefer that approach since some instrumentations require specific configurations (tracer_provider
, metrics_provider
, etc.). The image below shows the data captured in Application Insights:
@macieyng - Hello, I am a PM on the Azure Functions team and would like to chat with you about using OTel in your Azure Functions. If you are willing to chat, please email me at mikemort at microsoft dot com.
☝️ FYI We got in touch.
@BigMorty
We have plans to improve our OT based monitoring solution in Azure functions this upcoming semester. Feel free to reach out if you would like more context about this.
Is your feature request related to a problem? Please describe. We started to integrated OpenTelemetry with Azure Functions. It was tough for me to find all necessary resources and very clear description how to do that. A lot of resources that I've found seem to be outdated or contradict each other or I'm just bad at googling. But yeah, key thing: no clear description how to implement and integrate OpenTelemetry with Azure Functions.
I liked the way OpenCensus could be easily setup as an Azure Functions Extension with just
Describe the solution you'd like Simple and elegant way to easily integrate OpenTelemetry and Azure Functions with just a couple lines of code.
Describe alternatives you've considered None.
Additional context I took OpenCensusExtension approach and have implemented OpenTelemetryExtension that currently is focused on Traces and Logging - implementation below. It also allows instrumentation extensions to be correctly initialized. I think that solution is clear and elegant.
It seems that this could be a drop-in solution for those who have already implemented tracing and logging with OpenCensus.
I don't know how Azure Functions Extensions are currently being perceived, so I would like to know if you think it's okay to use them or this approach has changed or anything in that matter.
I very much would love to hear your feedback on the solution I'm showing you.
Mentioning @lzchen because our ways have crossed a few times with OpenCensus 😅