Support for modern telemetry beyond primitive logging
- Dominant language
- C#
- Stars
- 5.1k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the feature request
Please also see https://github.com/dotnet/MQTTnet/discussions/1625, https://github.com/dotnet/MQTTnet/pull/1866, and https://github.com/dotnet/MQTTnet/pull/1867.
* The IMqttNetLogger interface is inadequate for supporting telemetry in a large-scale consumer-grade context, as the logger.Publish method only provides telemetry for events (moments in time). It does not capture activities that span an interval in time.
* Current server properties leave gaps for meaningful metrics such as the number of active connections.
* The current server event hooks support extensibility and custom application behavior but leave gaps for capturing metrics such as connection and delivery counts.
### Which project is your feature request related to?
- Server
### Describe the solution you'd like
* .NET already has a built-in abstraction for activities, System.Diagnostics.Activity. Use it directly (preferred) or provide interfaces that enable wrapping of ActivitySource.BeginActivity, Activity::Stop, Activity.Current, and Activity::AddEvent.
* Add equivalents to ActivitySource::BeginActivity and Activity::Stop at the beginning and end of significant MQTT activities, such as processing of messages.
* Augment or replace calls to IMqttNetLogger::Publish with equivalents to Activity.Current::AddEvent.
* Add server properties for meaningful gauges like current active connections.
* Add events that support meaningful counters like total connections.
### Describe alternatives you've considered
We are already doing these in our own MqttNet fork but would like to reduce how much we're drifting from the upstream fork.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.