You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to propose a feature to enhance the Semantic Kernel library. The proposal is to add support for custom Meter objects from the System.Diagnostics.Metrics namespace in .NET, which is the standard metrics API.
The use case for this feature is to allow library users to capture and analyze metrics in their preferred metrics backend (Prometheus, Jaeger, etc.) via OpenTelemetry or other telemetry libraries. This would enable users to monitor performance, identify issues early, and gain insights into how their applications are being used.
To implement this feature, I suggest that the Builder class (or whatever class is used to configure the Semantic Kernel library) includes a withMeter(Meter meter) method, where Meter is an instance of System.Diagnostics.Metrics.Meter. This will allow users to pass in a custom Meter during configuration.
The code could look something like this:
varmeter=newMeter("MyApplication","1.0.0");varbuilder=newSemanticKernelBuilder().withMeter(meter)// other configuration....build();
In the Semantic Kernel library code, you would use this Meter to create and record metrics:
varcounter=this.meter.CreateCounter<long>("my-counter");// In relevant parts of the library:counter.Add(1);
This feature would not impose any specific telemetry library or backend on Semantic Kernel users. Instead, it would provide the flexibility for users to choose how they want to capture, export, and analyze metrics.
Thank you for considering this feature request.
The text was updated successfully, but these errors were encountered:
Hello Semantic Kernel team,
I would like to propose a feature to enhance the Semantic Kernel library. The proposal is to add support for custom
Meter
objects from theSystem.Diagnostics.Metrics
namespace in .NET, which is the standard metrics API.The use case for this feature is to allow library users to capture and analyze metrics in their preferred metrics backend (Prometheus, Jaeger, etc.) via OpenTelemetry or other telemetry libraries. This would enable users to monitor performance, identify issues early, and gain insights into how their applications are being used.
To implement this feature, I suggest that the
Builder
class (or whatever class is used to configure the Semantic Kernel library) includes awithMeter(Meter meter)
method, whereMeter
is an instance ofSystem.Diagnostics.Metrics.Meter
. This will allow users to pass in a customMeter
during configuration.The code could look something like this:
In the Semantic Kernel library code, you would use this
Meter
to create and record metrics:This feature would not impose any specific telemetry library or backend on Semantic Kernel users. Instead, it would provide the flexibility for users to choose how they want to capture, export, and analyze metrics.
Thank you for considering this feature request.
The text was updated successfully, but these errors were encountered: