man-group / dapr-sidekick-dotnet

Dapr Sidekick for .NET - a lightweight lifetime management component for Dapr
Apache License 2.0
175 stars 21 forks source link

Enable metrics option for sidecar process #39

Open helmerm opened 2 years ago

helmerm commented 2 years ago

Describe the feature

Support to disable the metrics server of the sidecar process.

Example command daprd --app-id test --enable-metrics=false

The DaprSentryProcess and DaprPlacementProcess both support this parameter.

Release Note

RELEASE NOTE:

ADD Support for --enable-metrics parameter for sidecar process

badgeratu commented 2 years ago

I'm struggling to remember why we didn't do this originally, I suspect the option wasn't available on the daprd process in the early days but I can see it is now. You're welcome to submit a PR to resolve it, if not we'll get to it with the next round of changes. In the meantime can you outline the problem having metrics enabled is causing you?

helmerm commented 2 years ago

If I find the time to create a PR before you guys, I let you know.

We are running multiple dapr sidecars on the same windows machine. Sidekick automatically tries to find a free port if the default is blocked. However, our python process' sidecar does not, which caused port conflicts and prevented the sidecar from starting. At the moment we do not use the metrics, that's why I wanted to turn it off.

For our situation, it was enough to turn it off for the python process, but I also wanted to do this for .NET.