dotnet add package Npgsql.OpenTelemetry --version 8.0.0-preview.4
NuGet\Install-Package Npgsql.OpenTelemetry -Version 8.0.0-preview.4
<PackageReference Include="Npgsql.OpenTelemetry" Version="8.0.0-preview.4" />
paket add Npgsql.OpenTelemetry --version 8.0.0-preview.4
#r "nuget: Npgsql.OpenTelemetry, 8.0.0-preview.4"
// Install Npgsql.OpenTelemetry as a Cake Addin #addin nuget:?package=Npgsql.OpenTelemetry&version=8.0.0-preview.4&prerelease // Install Npgsql.OpenTelemetry as a Cake Tool #tool nuget:?package=Npgsql.OpenTelemetry&version=8.0.0-preview.4&prerelease
Npgsql is the open source .NET data provider for PostgreSQL. It allows you to connect and interact with PostgreSQL server using .NET.
This package helps set up Npgsql's support for OpenTelemetry tracing, which allows you to observe database commands as they are being executed.
You can drop the following code snippet in your application's startup, and you should start seeing tracing information on the console:
using var tracerProvider = Sdk.CreateTracerProviderBuilder() .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("npgsql-tester")) .SetSampler(new AlwaysOnSampler()) // This optional activates tracing for your application, if you trace your own activities: .AddSource("MyApp") // This activates up Npgsql's tracing: .AddNpgsql() // This prints tracing data to the console: .AddConsoleExporter() .Build();
Once this is done, you should start seeing Npgsql trace data appearing in your application's console. At this point, you can look into exporting your trace data to a more useful destination: systems such as Zipkin or Jaeger can efficiently collect and store your data, and provide user interfaces for querying and exploring it.
For more information, visit the diagnostics documentation page.
|Product||Versions Compatible and additional computed target framework versions.|
|.NET||net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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.|
|.NET Core||netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed.|
|.NET Standard||netstandard2.0 is compatible. netstandard2.1 was computed.|
|.NET Framework||net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed.|
|MonoAndroid||monoandroid was computed.|
|MonoMac||monomac was computed.|
|MonoTouch||monotouch was computed.|
|Tizen||tizen40 was computed. tizen60 was computed.|
|Xamarin.iOS||xamarinios was computed.|
|Xamarin.Mac||xamarinmac was computed.|
|Xamarin.TVOS||xamarintvos was computed.|
|Xamarin.WatchOS||xamarinwatchos was computed.|
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Npgsql.OpenTelemetry:
TESSA library for building ASP.NET Core applications.
Framework for creating high-performance servers with domain object models.
Honeycomb's OpenTelemetry common instrumentations package. Adds support for many common instrumentation libraries for you.
Honeycomb's OpenTelemetry autoinstrumentations package. Adds support for many common instrumentation libraries for you.
Simplify opentelemetry configuration in ASP.NET Core
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Npgsql.OpenTelemetry:
Examples and Tutorials of Event Sourcing in .NET
A crowdsourced market board API for FFXIV.