Bnaya.Extensions.OpenTelemetry 5.1.163

dotnet add package Bnaya.Extensions.OpenTelemetry --version 5.1.163                
NuGet\Install-Package Bnaya.Extensions.OpenTelemetry -Version 5.1.163                
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.163" />                
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.163                
#r "nuget: Bnaya.Extensions.OpenTelemetry, 5.1.163"                
#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.163

// Install Bnaya.Extensions.OpenTelemetry as a Cake Tool
#tool nuget:?package=Bnaya.Extensions.OpenTelemetry&version=5.1.163                

Bnaya Open Telemetry Extensions

Build & Deploy NuGet

NuGet

codecov

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 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.

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.

Version Downloads Last updated
5.1.163 5,248 6/22/2023
5.1.162 345 6/16/2023
5.1.161 155 6/16/2023
5.1.160 161 6/15/2023
5.1.159 156 6/15/2023
5.1.158 158 6/15/2023