Azure / Azure/azure-iot-protocol-gateway
Custom Performance counter - "Connections Current" not updated properly
- Dominant language
- C#
- Stars
- 227
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Description
Current value I see in our PG instance is 1.8447+e019 and is the same value across 5 instances of PG that we have setup. However we haven't connect so many devices. The max number of devices we would have connected would be few millions as part of our performance tests.
Issues:
1. Upon role restart - the values are not set to 0
* typically when a role starts-up there won't be any devices connected to PG so it should be set to 0
2. If device disconnects without sending a proper disconnect request the counter is not decremented
*the counter's value goes off-sync and is not helping the monitoring utilities we have setup on PG
3. I have tried setting the rawvalue (and cookedValue) of this counter using PowerShell script but still the value 1.8447+e019 is shown when we read the value using perfmon. The last one might be a different issue, but I also noticed that this value doesn't get incremented when devices are getting connected and gets updated only when a device disconnects.
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the implementation of the custom "Connections Current" performance counter and trace how it is initialized during role startup and updated on device connect and disconnect. Reproduce the reported large value and the unclean-disconnect case, then verify that startup resets the counter and connection lifecycle changes keep it accurate in perfmon.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100