microsoft / DurableFunctionsMonitor

A monitoring/debugging UI tool for Azure Durable Functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changing logging verbosity for Durable Function Monitor

Burhaan-Targett opened this issue · comments

Firstly, awesome project.
I was wondering how I could adjust the logging verbosity for Durable Function Monitor independent of the application log verbosity. Currently, setting verbosity on the application to verbose floods our logs with durable function monitor events/log entries.

Firstly, awesome project.

Thanks @Burhaan-Targett , appreciate that!

adjust the logging verbosity for Durable Function Monitor independent of the application log verbosity

I assume, you're using DfMon in 'injected' mode (added as a package to your Function App). In that case DfMon becomes a structural part of your app, its endpoints use the same logger as your app's endpoints, and I'm afraid there's no way to let them use a different logger instance. Alternatively you can always deploy and use DfMon as a separate Function App instance.

setting verbosity on the application to verbose floods our logs with durable function monitor events/log entries

Can you elaborate on this? Are you saying that DfMon endpoints produce more logs than your normal endpoints/handlers (that, of course, shouldn't be the case under normal circumstances)?

its endpoints use the same logger as your app's endpoints, and I'm afraid there's no way to let them use a different logger instance

No, wait, I was wrong. There is actually a way to adjust logging level on a per-function basis via host.json. Would require mentioning every DfMon's endpoint explicitly and individually, e.g. like this:

    "logging": {
        "logLevel": {
            "default": "Trace",
            "Function.DfmAboutFunction": "Error",
            "Function.DfmCleanEntityStorageFunction": "Error",
            "Function.DfmDeleteTaskHubFunction": "Error",
            "Function.DfmGetConnectionInfoFunction": "Error",
            "Function.DfmGetEasyAuthConfigFunction": "Error",
            "Function.DfmGetFunctionMap": "Error",
            "Function.DfmGetIdSuggestionsFunction": "Error",
            "Function.DfmGetOrchestrationFunction": "Error",
            "Function.DfmGetOrchestrationHistoryFunction": "Error",
            "Function.DfmGetOrchestrationsFunction": "Error",
            "Function.DfmGetOrchestrationTabMarkupFunction": "Error",
            "Function.DfmGetTaskHubNamesFunction": "Error",
            "Function.DfmPostOrchestrationFunction": "Error",
            "Function.DfmPurgeHistoryFunction": "Error",
            "Function.DfmServeStaticsFunction": "Error",
            "Function.DfmStartNewOrchestrationFunction": "Error"
        }
    }

But still might be the way to go.

Does that address your issue, @Burhaan-Targett ?

Hope it helps. Pls, open another issue, if any further questions.

Awesome. Thanks for replying and specifying the individual endpoints, while tedious, is definitely something I can do.