GithubHelp home page GithubHelp logo

microsoft / durablefunctionsmonitor Goto Github PK

View Code? Open in Web Editor NEW
198.0 13.0 30.0 62.56 MB

A monitoring/debugging UI tool for Azure Durable Functions

License: MIT License

C# 36.93% TypeScript 45.76% HTML 16.17% Dockerfile 0.14% JavaScript 0.33% CSS 0.67%
azure-functions durable-functions vscode-extension

durablefunctionsmonitor's Introduction

logo

Durable Functions Monitor

A monitoring/debugging UI tool for Azure Durable Functions

Azure Durable Functions provide an easy and elegant way of building cloud-native Reliable Stateful Services in the Serverless world. The only thing that's missing so far is a UI for monitoring, managing and debugging your orchestration instances. This project tries to bridge the gap.

Nuget

GitHub Repo stars Visual Studio Marketplace Rating

Visual Studio Marketplace Installs Nuget

How to use

You can run this tool:

"Injected" DfMon can only be injected into a .NET Function project (either InProc or Isolated). All other DfMon incarnations work with any platforms/programming languages supported by Durable Task Framework.

See detailed instructions in our Wiki.

Contents of this repo

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

durablefunctionsmonitor's People

Contributors

bachuv avatar bhugot avatar davidmrdavid avatar dependabot[bot] avatar maximsieburgh avatar microsoft-github-operations[bot] avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar onemiguel avatar s-pilo avatar scale-tone avatar sebastianburckhardt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

durablefunctionsmonitor's Issues

[VsCodeExt] Support arbitrary connection strings

So that Storage (or MSSQL) connection strings can be entered and persisted by DfMon ext.
This will allow to monitor Task Hubs that are not reachable by current Azure login.
Also it will allow monitoring multiple instances that use MSSQL durability provider.

Connection strings should be persisted by using VsCode SecretStorage.

[VsCode] 'Command XXX resulted in an error (command yyy not found)' caused by failures during extension initialization

As observed in #6, DfMon VsCode extension may fail to load, if the current project contains local.settings.json file with some invalid JSON in it. Surprisingly, on a Mac VsCode doesn't even show an error message in that case. Subsequent attempts to invoke DfMon lead to errors like 'Command XXX resulted in an error (command yyy not found)'.

Need to put a try-catch around this line, to prevent that from happening.

DFM_ALLOWED_APP_ROLES problem in standalone version

Hi,

I am pretty sure I am missing something and this is not a bug, so if possible I would tag it as question.
I have an azure function resource that hosts the DurableFunctionsMonitor in the standalone version. I am trying to configure app roles and have one group of users that can only "read" and for example me with the permissions to start/restart etc.

For this I have followed the Wiki for the configuration and arrived with this setup:
image

And I have assigned to me the role "Writer":
image

Then I added the app settings to my azure function resource:
image

However, when I do this, as soon as the app restarts and I open a new clean session, login and get to the "home" page I receive a 401 error. This does not happen when I only configure allowed users by their emails with the app settings DFM_ALLOWED_USER_NAMES. However only using DFM_ALLOWED_USER_NAMES wouldn't accomplish what I am trying to achieve since any user would have full access in the durable functions monitor.
image

One thing that I am failing at as well is retrieving the access token to have a look at it.

Any ideas on what am I doing wrong?

Thank you very much in advance.

Enrico

Extension performs a ListKeys operation on all storage accounts your account has access to

We ran into a bit of a scare earlier when we noticed that for some accounts a ListKeys operation was detected on multiple storage accounts at several of our customers. Our company does consulting for different customers and as a result those consultants have access to several different Azure tenants and subscriptions. Some of these are managed through Lighthouse, but some of them get access through the use of guest accounts invited to those tenants.

After being notified by one of the security teams about this ListKeys operation we saw that this was happening across all of this customer's subscription, and that this was happening at other customers as well. It seems like all affected storage accounts were those that have their access governed through Azure Lighthouse.

Steps to reproduce:

  • Open VS Code
  • Authenticate to Azure using the Azure extension (using an account that has Lighthouse managed customers)
  • Open the Durable functions monitor tab
  • Wait a few minutes, then navigate to the activity log of one of the storage accounts in one of these Lighthouse subscriptions
  • Take note of the fact that your account did a ListKeys operation on this storage account without ever being selected in the extension

To us this seems like a security concern, or at least will continue to make security teams very nervous whenever this shows up. Would it not be more sensible for the ListKeys operation to only be triggered for an individual storage account that gets selected?

Does DFM_ALTERNATIVE_CONNECTION_STRING_* Support Identity connection ?

Hi,

I try to use a standalone DFM installation to monitor 4 differents functions.
Set DFM_ALTERNATIVE_CONNECTION_STRING_* for all 4 works well if I set the full connection string with key and so on but is there a way to use DFM identity to connect other storage account ?

Thanks

Unable to see the subscription account in the durable section on VS code

I am unable to see the subscription account in the durable functions section of the Azure tab on VS code. Because of this, I am unable to view the test hubs created for monitoring the codes and debugging on the Durable Monitor. I can't open the Durable Monitor either. The VS code was reinstalled with the updated version and the Durable Functions Monitor extension was also installed. I am using a Mac device.
Screenshot 2021-12-28 at 3 42 33 PM

Support K8s ingress controllers with URL rewrite

Hello,
I set up the DFM on our Kubernetes cluster using the instructions provided in the docs, then I added a service resource and an ingress resource.
The ingress publishes the DFM under path /dfm. but when I try to access the endpoint I get a white screen on the browser and it seems that the DFM deployment redirects the browser to the root of the URL instead under the path /dfm

image

Has anyone been able to publish the DFM via ingress? Below is the config for my ingress resources using the Nginx rewrite rule.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /$2
  name: dfm
  namespace: durablefunctions
spec:
  tls:
  - hosts:
    - example.dev.dom.com
    secretName: dev-ingress-tls
  rules:
  - host: example.dev.dom.com
    http:
      paths:
      - backend:
          service:
            name: dfm
            port:
              number: 8080
        path: /dfm(/|$)(.*)
        pathType: Prefix

[Backend] Check if we handle HTTP headers as case-insensitive

According to the standard, HTTP header names are case-INsensitive.
As it turned out, some environments (by which I mean Kubernetes) may treat this literally and convert response header names to lower case on-the-fly.
Need to check whether we handle this case correctly (spoiler: most likely not).

Should username claim be case insensitive?

Great work with this project guys! So useful :)

I noticed the username-based claim failed a couple of times for us due to case-sensitivity reasons. Should this check be done case-insensitively?

Support identity-based connections to Storage (Managed Identity for Azure, VsCode Azure login for VsCode)

Hello,

I am using the VS code extension of DFM. Since version 2.7.0 DF supports identity-based connections to the underlying storage provider. In my case I am using an Azure Storage account.

Please note: This storage account is configured to disable storage account key access to improve security.

I have granted the function app's MSI the blob, queue, and table contributor roles and this works fine. I also granted myself the same RBAC permissions. But now I cannot use the VS code extension because the connect dialog expects either a storage or SQL connection string and thus does not use my AAD identity for connecting.

Is there a workaround for this or am I simply doing something wrong?

Any help with this is greatly appreciated.

[VsCode] Connecting to a task hub results in error like 'npm list -g --depth=0 npm ERR! ...'

Starting from v5.2 DfMon's VsCode extension resolves the full true path to func.exe by executing npm list -g --depth=0 (to get the location of npm's global packages) and then looking for azure-functions-core-tools package in that folder.

It appears, that npm list -g --depth=0 might fail, if there's any corruption/incompatibility in those global packages.

If you're getting an error related to this, then the quick solution is to explicitly specify full path to func.exe (or just func on some platforms) via this setting:

image

On Windows that path typically looks like C:\Users\username\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\func.exe. On other platforms it will be different, but similarly related to npm's global folder.

[FunctionGraph] Make trigger/binding nodes clickable as well

At the moment, orchestration/entity/activity nodes are clickable and lead to their implementations in source code.

Would be great to implement the same thing for trigger/binding nodes. Clicking on a binding should open its corresponding resource (blob container, queue, topic, event hub etc.) blade in Azure Portal.

Constructing a link to Azure Portal blade requires knowledge of:

  • Tenant Name
  • Azure SubscriptionID
  • Resource Group Name

Let's try to infer these values from Function App instance and/or from local.settings.json.

Can I use groups instead of roles?

My company has disabled the ability for anyone to app App Roles to users. This is not something I'm going to be able to change. However they have a process where you can get into groups. The guids for these Groups show up in the auth tokens created when the user authenticates with code flow with the App Registration.

Is there anyway for me to configure this tool to look for a users Groups instead of Roles?

Question about activity durations on Gantt charts

Btw I have a question for you: I've noticed that the total run time for each activity on the Gantt chart is a sum of "waiting time" with "execution" time. Is there a way for you to show those timings separately?

I say that because on the servers I have a 10 minute limit, and I can see some taking 20 min. So, I suppose this is the sum of waiting time (scheduled) with actual execution time.

Originally posted by @junalmeida in #22 (comment)

Login to DFM stuck on "Select your Task Hub"

Hello,
I set up DFM on Kubernetes with DfMon for client-directed authentication, I didn't set the DFM_ALLOWED_APP_ROLES or DFM_ALLOWED_USER_NAMES

When login into the DFM URL the authentication is successful but then I see the following screenshot without any ability to continue.

image

Does anyone has any suggestion as to how to fix this?

Here is the log file with the deployment file I setup.

`info: Host.Triggers.DurableTask[0]
Using the default storage provider: AzureStorage.
info: Host.Triggers.Warmup[0]
Initializing Warmup Extension.
info: Host.Triggers.DurableTask[0]
Durable extension configuration loaded: {"httpSettings":{"defaultAsyncRequestSleepTimeMilliseconds":30000},"hubName":"TestHubName","storageProvider":{"connectionName":null,"connectionStringName":null,"controlQueueBatchSize":32,"partitionCount":4,"controlQueueBufferThreshold":256,"controlQueueVisibilityTimeout":"00:05:00","workItemQueueVisibilityTimeout":"00:05:00","trackingStoreConnectionName":null,"trackingStoreConnectionStringName":null,"trackingStoreNamePrefix":null,"fetchLargeMessagesAutomatically":true,"maxQueuePollingInterval":"00:00:30","useLegacyPartitionManagement":false},"tracing":{"traceInputsAndOutputs":false,"allowVerboseLinuxTelemetry":false,"traceReplayEvents":false,"distributedTracingEnabled":false,"distributedTracingProtocol":"HttpCorrelationProtocol"},"notifications":{"eventGrid":null},"maxConcurrentActivityFunctions":20,"maxConcurrentOrchestratorFunctions":20,"localRpcEndpointEnabled":null,"maxEntityOperationBatchSize":5000,"extendedSessionsEnabled":false,"extendedSessionIdleTimeoutInSeconds":30,"maxOrchestrationActions":100000,"overridableExistingInstanceStates":"NonRunningStates","entityMessageReorderWindowInMinutes":30,"useGracefulShutdown":false,"rollbackEntityOperationsOnExceptions":true,"useAppLease":true,"appLeaseOptions":{"renewInterval":"00:00:25","acquireInterval":"00:05:00","leaseInterval":"00:01:00"}}. HubName: TestHubName. AppName: . SlotName: . ExtensionVersion: 2.8.1.
info: Host.Startup[503]
Initializing Host. OperationId: '8d4b35ec-8b3c-4e9d-b775-52b284c14e46'.
info: Host.Startup[504]
Host initialization: ConsecutiveErrors=0, StartupCount=1, OperationId=8d4b35ec-8b3c-4e9d-b775-52b284c14e46
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
LoggerFilterOptions
{
"MinLevel": "None",
"Rules": [
{
"ProviderName": null,
"CategoryName": null,
"LogLevel": null,
"Filter": "b__0"
},
{
"ProviderName": null,
"CategoryName": "Host.Function.ToolingConsoleLog",
"LogLevel": "Information",
"Filter": null
},
{
"ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
"CategoryName": null,
"LogLevel": "None",
"Filter": null
},
{
"ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
"CategoryName": null,
"LogLevel": null,
"Filter": "b__0"
}
]
}
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
ConcurrencyOptions
{
"DynamicConcurrencyEnabled": false,
"MaximumFunctionConcurrency": 500,
"CPUThreshold": 0.8,
"SnapshotPersistenceEnabled": true
}
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
FunctionResultAggregatorOptions
{
"BatchSize": 1000,
"FlushTimeout": "00:00:30",
"IsEnabled": true
}
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
SingletonOptions
{
"LockPeriod": "00:00:15",
"ListenerLockPeriod": "00:01:00",
"LockAcquisitionTimeout": "10675199.02:48:05.4775807",
"LockAcquisitionPollingInterval": "00:00:05",
"ListenerLockRecoveryPollingInterval": "00:01:00"
}
info: Microsoft.Azure.WebJobs.Hosting.JobHostService[0]
Starting JobHost
info: Host.Startup[401]
Starting Host (HostId=dfm59754fbbf5qktbm-2137340777, InstanceId=592964f8-a227-4d55-a696-ca9697fa4846, Version=4.14.0.0, ProcessId=1, AppDomainId=1, InDebugMode=False, InDiagnosticMode=False, FunctionsExtensionVersion=(null))
info: Host.Startup[314]
Loading functions metadata
info: Host.Startup[326]
Reading functions metadata
info: Host.Startup[327]
1 functions found
info: Host.Startup[315]
17 functions loaded
info: Host.Startup[0]
Generating 17 job function(s)
info: Host.Startup[0]
Found the following functions:
DurableFunctionsMonitor.DotNetBackend.About.DfmAboutFunction
DurableFunctionsMonitor.DotNetBackend.CleanEntityStorage.DfmCleanEntityStorageFunction
DurableFunctionsMonitor.DotNetBackend.DeleteTaskHub.DfmDeleteTaskHubFunction
DurableFunctionsMonitor.DotNetBackend.ManageConnection.DfmGetConnectionInfoFunction
DurableFunctionsMonitor.DotNetBackend.ManageConnection.DfmManageConnectionFunction
DurableFunctionsMonitor.DotNetBackend.EasyAuthConfig.DfmGetEasyAuthConfigFunction
DurableFunctionsMonitor.DotNetBackend.FunctionMap.DfmGetFunctionMap
DurableFunctionsMonitor.DotNetBackend.IdSuggestions.DfmGetIdSuggestionsFunction
DurableFunctionsMonitor.DotNetBackend.Orchestration.DfmGetOrchestrationFunction
DurableFunctionsMonitor.DotNetBackend.Orchestration.DfmGetOrchestrationHistoryFunction
DurableFunctionsMonitor.DotNetBackend.Orchestration.DfmGetOrchestrationTabMarkupFunction
DurableFunctionsMonitor.DotNetBackend.Orchestration.DfmPostOrchestrationFunction
DurableFunctionsMonitor.DotNetBackend.Orchestration.DfmStartNewOrchestrationFunction
DurableFunctionsMonitor.DotNetBackend.Orchestrations.DfmGetOrchestrationsFunction
DurableFunctionsMonitor.DotNetBackend.TaskHubNames.DfmGetTaskHubNamesFunction
DurableFunctionsMonitor.DotNetBackend.PurgeHistory.DfmPurgeHistoryFunction
DurableFunctionsMonitor.DotNetBackend.ServeStatics.DfmServeStaticsFunction

info: Microsoft.Azure.WebJobs.Script.WebHost.WebScriptHostHttpRoutesManager[0]
Initializing function HTTP routes
Mapped function route '/a/p/i/{connName}-{hubName}/about' [get] to 'DfmAboutFunction'
Mapped function route '/a/p/i/{connName}-{hubName}/clean-entity-storage' [post] to 'DfmCleanEntityStorageFunction'
Mapped function route '/a/p/i/{connName}-{hubName}/delete-task-hub' [post] to 'DfmDeleteTaskHubFunction'
Mapped function route '/a/p/i/{connName}-{hubName}/manage-connection' [get] to 'DfmGetConnectionInfoFunction'
Mapped function route '/a/p/i/easyauth-config' [get] to 'DfmGetEasyAuthConfigFunction'
Mapped function route '/a/p/i/{connName}-{hubName}/function-map' [get] to 'DfmGetFunctionMap'
Mapped function route '/a/p/i/{connName}-{hubName}/id-suggestions(prefix='{prefix}')' [get] to 'DfmGetIdSuggestionsFunction'
Mapped function route '/a/p/i/{connName}-{hubName}/orchestrations('{instanceId}')' [get] to 'DfmGetOrchestrationFunction'
Mapped function route '/a/p/i/{connName}-{hubName}/orchestrations('{instanceId}')/history' [get] to 'DfmGetOrchestrationHistoryFunction'
Mapped function route '/a/p/i/{connName}-{hubName}/orchestrations' [get] to 'DfmGetOrchestrationsFunction'
Mapped function route '/a/p/i/{connName}-{hubName}/orchestrations('{instanceId}')/custom-tab-markup('{templateName}')' [post] to 'DfmGetOrchestrationTabMarkupFunction'
Mapped function route '/a/p/i/task-hub-names' [get] to 'DfmGetTaskHubNamesFunction'
Mapped function route '/a/p/i/{connName}-{hubName}/manage-connection' [put] to 'DfmManageConnectionFunction'
Mapped function route '/a/p/i/{connName}-{hubName}/orchestrations('{instanceId}')/{action?}' [post] to 'DfmPostOrchestrationFunction'
Mapped function route '/a/p/i/{connName}-{hubName}/purge-history' [post] to 'DfmPurgeHistoryFunction'
Mapped function route '/{p1?}/{p2?}/{p3?}' [get] to 'DfmServeStaticsFunction'
Mapped function route '/a/p/i/{connName}-{hubName}/orchestrations' [post] to 'DfmStartNewOrchestrationFunction'

info: Host.Startup[412]
Host initialized (126ms)
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
HttpOptions
{
"DynamicThrottlesEnabled": false,
"EnableChunkedRequestBinding": false,
"MaxConcurrentRequests": -1,
"MaxOutstandingRequests": -1,
"RoutePrefix": ""
}
info: Host.Startup[413]
Host started (140ms)
info: Host.Startup[0]
Job host started
Hosting environment: Production
Content root path: /azure-functions-host
Now listening on: http://[::]:80
Application started. Press Ctrl+C to shut down.
info: Host.General[337]
Host lock lease acquired by instance ID '000000000000000000000000DFC1E694'.
info: Function.DfmServeStaticsFunction[1]
Executing 'DfmServeStaticsFunction' (Reason='This function was programmatically called via the host APIs.', Id=af8e3201-4273-4d53-8a84-5b555b0f3c13)
info: Function.DfmServeStaticsFunction.User[0]
DFM endpoint: /dfm
info: Function.DfmServeStaticsFunction[2]
Executed 'DfmServeStaticsFunction' (Succeeded, Id=af8e3201-4273-4d53-8a84-5b555b0f3c13, Duration=138ms)
info: Function.DfmGetEasyAuthConfigFunction[1]
Executing 'DfmGetEasyAuthConfigFunction' (Reason='This function was programmatically called via the host APIs.', Id=f1f6f87c-4784-48be-b860-c5370e70bf48)
info: Function.DfmGetEasyAuthConfigFunction[2]
Executed 'DfmGetEasyAuthConfigFunction' (Succeeded, Id=f1f6f87c-4784-48be-b860-c5370e70bf48, Duration=8ms)
info: Function.DfmGetTaskHubNamesFunction[1]
Executing 'DfmGetTaskHubNamesFunction' (Reason='This function was programmatically called via the host APIs.', Id=77110622-c7d4-44b4-80f1-b0f9f136e09b)
info: Function.DfmGetTaskHubNamesFunction[2]
Executed 'DfmGetTaskHubNamesFunction' (Succeeded, Id=77110622-c7d4-44b4-80f1-b0f9f136e09b, Duration=229ms)
deployment.yaml.txt
`

[VsCode] Backend instances keep being alive on Windows 11

It might be a machine-specific issue, but I now observe, that backend processes started by DfMon VsCode extension might not be killed properly and survive even VsCode restarts.
taskkill command is used to kill them, and looks like it doesn't work:

C:\WINDOWS\system32>taskkill /pid <my-process-id> /f
ERROR: Not found

At least, on this machine. At least, on Windows 11.

Need to find another way of running/killing the backend.

Activity and their input

Hello!

Big thanks for this awesome project, keep it up!

Today you can see the result of an activity, but I wonder if it’s possible to view the input of an activity?

Thanks in advance!

[v6.1][VsCode] Unable to start new orchestration instances, if Task Hub name is `TestHubName` (default for local setup). 401 Unauthorized.

Using Vscode extension with local storage that has "TestTaskName" as task hub is throwing 401 non authorized
when launching a new instance of an orchestrator
By looking into vscode output i see the message "Task hub testhubtask is not allowed", i digged into the source code and looks this is related to the fact that the hub name by default "TestHubName" is not in hubName in host.json, adding it to my project does not solve the issue, the only workaround was to add in the extension binary folder host.json file :

"extensions": {
"durableTask": {
"hubName": "TestHubName"
}
}

I think this is a regression, before it was working fine,
Either it should read local host.json file of the project when running in VsCode or bypass the authroization check when running VsCode mode

Consumption Plan doesn't expose Env variable `WEBSITE_AUTH_OPENID_ISSUER`

Hi, I just come across this issue when I configured AAD Auth on Azure Function running on Consumption Plan

The login URL looks like https://login.microsoftonline.com/common/oauth2/v2.0/auth ... and it is trying to find the App Registration in my home tenant. However I'm using resources, SPN from different tenant than my home tenant.

The login URL should looks like https://login.microsoftonline.com/<specific tenant>/oauth2/v2.0/auth ...

The Env variable WEBSITE_AUTH_OPENID_ISSUER should replace common with the resource tenantId, however because this variable is not exposed, it fallback to common

Not sure about the solution. Either use variable AZURE_TENANT_ID which is configured with SPN credentials used for the Function Code or define new variable just for this purpose?

Thanks!

Question: Netherite monitor in Standalone mode

Hi,
I wanted to ask whether this is possible at the moment. I have a durable function monitor deployed in standalone mode that is monitoring taskhubs from an Azure storage. I then moved one function app that I was monitoring to Netherite but from the durable Monitor I can only see task hub names of functions that are using AzureStorage as storage provider.

Is this possible at all or am I missing something from the picture?

Backend fails to start

Trying to start the backend in VSCODE, I can see the following log:

Azure Functions Core Tools
Core Tools Version:       4.0.4785 Commit hash: N/A  (64-bit)
Function Runtime Version: 4.10.4.19213

Warning: Proxies are not supported in Azure Functions v4. Instead of 'proxies.json', try Azure API Management: https://aka.ms/AAfiueq
[2022-11-25T15:58:10.623Z] Csproj not found in c:\Users\junior\.vscode\extensions\durablefunctionsmonitor.durablefunctionsmonitor-6.0.0\backend directory tree. Skipping user secrets file configuration.
[2022-11-25T15:58:17.990Z] A host error has occurred during startup operation '4bac7748-7552-499c-aa98-c04bfd6e38b8'.
[2022-11-25T15:58:17.990Z] Microsoft.Azure.WebJobs.Extensions.Http: Could not load file or assembly 'System.Net.Http.Formatting, Version=5.2.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
ERROR: Value cannot be null. (Parameter 'provider')ERROR: 

It does not complete.

Load failed. Request failed with status 500

Load failed. Request failed with status code 500.

Got the auth working now but not sure what's wrong. The Manage Storage Connection Settings has my connection string in there. I'm using it as the nuget package with just plain DfmEndpoint.Setup(); call. Running on Functions v4 Windows x64.

image

Migrate to Functions v4

Deployed DfMon instance to Azure from latest NuGet package (using handy button on "How-to-run-DfMon-in-Standalone-mode" page). I see that Azure is warning to update function application to the Functions 4.x runtime by December 3rd.

Monitor_Support

Is this something that can be easily fixed before losing the support by December 3rd?

Issues Running durablefunctionsmonitor.dotnetbackend Locally

I'm having issues with running DFM locally, see error output below.

I followed the instructions (How to run locally) in the readme at https://github.com/microsoft/DurableFunctionsMonitor/tree/main/durablefunctionsmonitor.dotnetbackend

I'm hoping you have seen this issue before and is just a configuration issue of some kind.
Any thoughts?

Environment:
Visual Studio Code Version: 1.72.2 

Azure Functions Core Tools
Core Tools Version:       4.0.4829 Commit hash: N/A  (64-bit)
Function Runtime Version: 4.11.2.19273
		
Output:	

[2022-10-27T13:47:35.752Z] Error indexing method 'DfmPurgeHistoryFunction'
[2022-10-27T13:47:35.754Z] Microsoft.Azure.WebJobs.Host: Error indexing method 'DfmPurgeHistoryFunction'. Microsoft.Azure.WebJobs.Host: Functions must return Task or void, have a binding attribute for the return value, or be triggered by a binding that natively supports return values.
[2022-10-27T13:47:35.755Z] Function 'DfmPurgeHistoryFunction' failed indexing and will be disabled.

[2022-10-27T13:47:35.761Z] A host error has occurred during startup operation '95e959ae-709d-4536-8bb1-89ce9984cada'.
[2022-10-27T13:47:35.763Z] System.Private.CoreLib: Could not load type 'System.Diagnostics.DebuggerStepThroughAttribute' from assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Value cannot be null. (Parameter 'provider')

Running image as non root on Kubernetes failed.

Hi
In our company, we require to run all k8s pods as NonRootUser, Due to this I tried to run the DFM container as NonRoot using Kubernetes spec.securityContext.runAsNonRoot.

The issue is that DotNet container images don't have a dedicated user for the applications like Node containers have. I found the following article which explains how to configure DotNet containers to run the applications as a NonRoot user.

Hardening an ASP.NET container running on Kubernetes

I updated the Dockerfile given in the durablefunctionsmonitor.dotnetbackend to look like the following:

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS installer-env

# Build requires 3.1 SDK
COPY --from=mcr.microsoft.com/dotnet/core/sdk:3.1 /usr/share/dotnet /usr/share/dotnet

COPY . /src/dotnet-function-app
RUN cd /src/dotnet-function-app && \
    mkdir -p /home/site/wwwroot && \
    dotnet publish *.csproj --output /home/site/wwwroot

FROM mcr.microsoft.com/azure-functions/dotnet:4

#Create a Linux user in the container called DFM with UID and GID of 1000
RUN groupadd -r dfm --gid 1000 && \
    useradd --uid 1000 -r --gid 1000 "dfm"

# Configure the container to automatically start with the DFM user by default
USER 1000:1000 

EXPOSE 8080

# Configure the ASP HTTP web site to listen on port 8080
# This is due to the fact that non-root users aren't allow to bind to ports 1024 and below
ENV ASPNETCORE_URLS=http://*:8080
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
    AzureFunctionsJobHost__Logging__Console__IsEnabled=true

# Configure the copied files to be owned by the DFM user
COPY --chown=dfm:dfm --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"]

I updated the DFM deployment manifest with the following settings and change the image to point to our private continer registry.

      securityContext:
        runAsNonRoot: true

This solved my issues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.