Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for modern telemetry beyond primitive logging #1878

Open
kallayj opened this issue Nov 14, 2023 · 0 comments
Open

Support for modern telemetry beyond primitive logging #1878

kallayj opened this issue Nov 14, 2023 · 0 comments
Labels
feature-request New feature or request

Comments

@kallayj
Copy link
Contributor

kallayj commented Nov 14, 2023

Describe the feature request

Please also see #1625, #1866, and #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.

@kallayj kallayj added the feature-request New feature or request label Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant