Open ThomasCronholm opened 6 years ago
Unfortunately I'm not familiar with BeginScope
or how it's supposed to be used. Can you tell me more about what you're trying to achieve? Maybe there is a better way. I expect there will be problems with methods like this that have global side-effects because of the replay nature of orchestrator functions.
Well the idea for us, is to have a mechanism for storing correlation id's so that we easlily can follow a durable execution through all logging we do using one id. Letting replay run as usual is not a problem as the thought of scope is to only couple different log entries together. GetStatusAsync with history is great and we love it, but when looking at logs there is a need to follow the thread, and as far as I have found getting the status with history is not easy from Application Insights. (sorry if I am rambling a bit)
@ThomasCronholm I would not expect that durable functions/orchestrators called from an orchestrator would know about the logging scope created in the orchestrator. The function could run on an entirely different host. It sure would be handy if it did and is probably a cool candidate for more durable function "magic".
It sounds unlikely that this is possible, but may be worth investigation.
FWIW, we're working on adding end-to-end correlation features to Durable Functions that might help address @ThomasCronholm's need. You can track progress here: https://github.com/Azure/azure-functions-durable-extension/issues/939. A PR for this work is expected sometime this week.
I'm interested in a feature like this. This would make it a lot easier to pass around state to keep with the logs. @cgillum it looks like the end-to-end correlation feature has landed, but this didn't make it in with it.
I can see a section related to this in the limitations of the correlation-csharp documentation. It seems like a PR that was blocking support for this has been merged. Is this something that can be reconsidered for support?
The custom property is available for ActivityTrigger once this pull request is accepted and a change added to the Durable Functions side. Track original activity at the Application Insights Logger
Any update on this? It would be huge help for improved tracability, especially in eternal orchestrations and multiple suborchestrations. We'd like to trace each orchestration run (invoked with ContinueAsNew) and suborchestration seperately.
Hi,
When I create a ILogger Scope in my method with a DurableOrchestrationContext, activities called does not log the scope. I understand why but I am wondering if anything can be done about it, so that the scope is automagically included and is logged when I am in the activity.
If not, are there any reccomendations, like "pass the logger in as a parameter" etc?