-
I have a custom logging implementation that sends a log to an external service via an HTTP POST. I understand that orchestration functions should never do any kind of IO, but I'm a little confused as to how I should log stuff out to my service in that case. Would it be overkill to create an activity function that just sends a message to the logging API via an HTTP client? Note that I will essentially be calling this activity whenever I want to log debug/info/error messages from my orchestrator function. Is the overhead of starting an Activity high compared to how lightweight (asynchronous, and non blocking) logging should be? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
This feels like a bit of overkill. We typically see most users either use Application Insights for logging or use dependency injection to plug in their own loggers which intercept the normal log statements from functions and publish it somewhere else. This approach tends to scale better since logging statements are non-blocking and logs can be pushed out in batches, outside the main orchestrator function invocation. What language are you using to develop your apps? Have you considered using the built-in logging infrastructure of Azure Functions? https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitoring |
Beta Was this translation helpful? Give feedback.
This feels like a bit of overkill. We typically see most users either use Application Insights for logging or use dependency injection to plug in their own loggers which intercept the normal log statements from functions and publish it somewhere else. This approach tends to scale better since logging statements are non-blocking and logs can be pushed out in batches, outside the main orchestrator function invocation.
What language are you using to develop your apps? Have you considered using the built-in logging infrastructure of Azure Functions?
https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitoring