Bnaya.Extensions.OpenTelemetry
5.1.162
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Bnaya.Extensions.OpenTelemetry --version 5.1.162
NuGet\Install-Package Bnaya.Extensions.OpenTelemetry -Version 5.1.162
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bnaya.Extensions.OpenTelemetry" Version="5.1.162" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bnaya.Extensions.OpenTelemetry --version 5.1.162
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Bnaya.Extensions.OpenTelemetry, 5.1.162"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Bnaya.Extensions.OpenTelemetry as a Cake Addin #addin nuget:?package=Bnaya.Extensions.OpenTelemetry&version=5.1.162 // Install Bnaya.Extensions.OpenTelemetry as a Cake Tool #tool nuget:?package=Bnaya.Extensions.OpenTelemetry&version=5.1.162
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Bnaya Open Telemetry Extensions
Extends OpenTelemetry API:
Usability improvement when building metrics tags.
Having the following API:
Counter<int> c = meter.CreateCounter<int>("counter1");
c.WithTag("Color", "red")
.WithTag("Price", "Low")
.Add(5);
h.WithTag("Size", 123)
.Record(19);
udc.WithTag("Color", "red")
.Add(-33);
instead of
Counter<int> c = meter.CreateCounter<int>("counter1");
c.Add(5,
new KeyValuePair<string,object?>("Color", "red"),
new KeyValuePair<string, object?>("Price", "Low"));
h.Record(19,
new KeyValuePair<string, object?>("Size", 123));
udc.Add(-33,
new KeyValuePair<string, object?>("Color", "red"));
The changes introduce an immutable Builder pattern therefore it can benefit from setting the tags once for multiple usage i.e.
Counter<int> c = meter.CreateCounter<int>("counter1");
c.WithTag("Color", "red")
.WithTag("Price", "Low")
.Add(5)
.Add(6)
.Add(7);
Because it's immutable, the following scenario will work just fine:
Counter<int> c = meter.CreateCounter<int>("counter1");
var counter1 = c.WithTag("Color", "red");
var counter2 = counter1.WithTag("Price", "Low")
.Add(5)
.Add(6)
.Add(7);
counter1.Add(-1); // won't have the Price tag
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- System.Diagnostics.DiagnosticSource (>= 7.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Bnaya.Extensions.OpenTelemetry:
Package | Downloads |
---|---|
EventSourcing.Backbone.Abstractions
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.