![]() |
VOOZH | about |
dotnet add package I-Synergy.Framework.OpenTelemetry --version 2026.10616.12121
NuGet\Install-Package I-Synergy.Framework.OpenTelemetry -Version 2026.10616.12121
<PackageReference Include="I-Synergy.Framework.OpenTelemetry" Version="2026.10616.12121" />
<PackageVersion Include="I-Synergy.Framework.OpenTelemetry" Version="2026.10616.12121" />Directory.Packages.props
<PackageReference Include="I-Synergy.Framework.OpenTelemetry" />Project file
paket add I-Synergy.Framework.OpenTelemetry --version 2026.10616.12121
#r "nuget: I-Synergy.Framework.OpenTelemetry, 2026.10616.12121"
#:package I-Synergy.Framework.OpenTelemetry@2026.10616.12121
#addin nuget:?package=I-Synergy.Framework.OpenTelemetry&version=2026.10616.12121Install as a Cake Addin
#tool nuget:?package=I-Synergy.Framework.OpenTelemetry&version=2026.10616.12121Install as a Cake Tool
The I-Synergy.Framework provides a flexible OpenTelemetry integration that separates instrumentation configuration from exporter configuration. This separation allows for cleaner code organization and better maintainability.
The OpenTelemetry integration in I-Synergy.Framework consists of:
ITelemetryProvider interface that defines the contractOpenTelemetryProvider implementation// In Program.cs or Startup.cs
builder.Logging.AddOpenTelemetry(
builder.Configuration,
builder.Environment,
infoService,
"Telemetry",
tracerInstrumentationAction: ConfigureTracingInstrumentation,
tracerExportersAction: ConfigureTracingExporters,
meterInstrumentationAction: ConfigureMetricsInstrumentation,
meterExportersAction: ConfigureMetricsExporters,
loggerInstrumentationAction: ConfigureLoggingInstrumentation,
loggerExportersAction: ConfigureLoggingExporters);
Instrumentation actions should configure what telemetry data to collect.
These actions should add sources, configure sampling, and set up instrumentation for specific libraries or frameworks.
private static void ConfigureTracingInstrumentation(TracerProviderBuilder builder)
{
// Add sources to collect data from
builder.AddSource("MyApplicationName");
// Add instrumentation for specific libraries
builder.AddHttpClientInstrumentation(opts =>
{
opts.RecordException = true;
opts.EnrichWithException = (activity, exception) =>
{
activity.SetTag("error.type", exception.GetType().Name);
activity.SetTag("error.message", exception.Message);
};
});
// Add ASP.NET Core instrumentation
builder.AddAspNetCoreInstrumentation();
}
Exporter actions should configure where to send the collected telemetry data.
These actions should add exporters to different backends or services.
private static void ConfigureTracingExporters(TracerProviderBuilder builder)
{
// Add Azure Monitor exporter
builder.AddAzureMonitorTraceExporter(options =>
{
options.ConnectionString = "your-connection-string";
});
// Add Jaeger exporter
builder.AddJaegerExporter(options =>
{
options.AgentHost = "localhost";
options.AgentPort = 6831;
});
}
builder.Logging.AddOpenTelemetry(
builder.Configuration,
builder.Environment,
infoService,
"Telemetry",
tracerInstrumentationAction: builder =>
{
builder.AddSource(infoService.ProductName);
builder.AddHttpClientInstrumentation();
},
tracerExportersAction: builder =>
{
var connectionString = builder.Configuration["Telemetry:ConnectionString"];
if (!string.IsNullOrEmpty(connectionString))
{
builder.AddAzureMonitorTraceExporter(options =>
{
options.ConnectionString = connectionString;
});
}
},
meterExportersAction: builder =>
{
var connectionString = builder.Configuration["Telemetry:ConnectionString"];
if (!string.IsNullOrEmpty(connectionString))
{
builder.AddAzureMonitorMetricExporter(options =>
{
options.ConnectionString = connectionString;
});
}
},
loggerExportersAction: builder =>
{
var connectionString = builder.Configuration["Telemetry:ConnectionString"];
if (!string.IsNullOrEmpty(connectionString))
{
builder.AddOpenTelemetry(options =>
{
options.AddAzureMonitorLogExporter(o =>
o.ConnectionString = connectionString);
});
}
});
builder.Logging.AddOpenTelemetry(
builder.Configuration,
builder.Environment,
infoService,
"Telemetry",
tracerInstrumentationAction: builder =>
{
builder.AddSource(infoService.ProductName);
builder.AddSentry();
SentrySdk.Init(options =>
{
builder.Configuration.GetSection("Telemetry").Bind(options);
options.Environment = builder.Environment.EnvironmentName;
options.Debug = builder.Environment.IsDevelopment();
options.ServerName = infoService.ProductName;
options.Release = infoService.ProductVersion.ToString();
options.UseOpenTelemetry();
});
});
For manual instrumentation, you can inject and use the ActivitySource that's registered by the framework:
public class MyService
{
private readonly ActivitySource _activitySource;
public MyService(ActivitySource activitySource)
{
_activitySource = activitySource;
}
public void DoSomething()
{
using var activity = _activitySource.StartActivity("DoSomething");
activity?.SetTag("custom.tag", "value");
// Your code here
}
}
You can add custom resource attributes through the OpenTelemetryOptions:
{
"Telemetry": {
"CustomAttributes": {
"deployment.region": "WestEurope",
"service.team": "MyTeam"
}
}
}
These attributes will be added to all telemetry data sent from your application.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 4 NuGet packages that depend on I-Synergy.Framework.OpenTelemetry:
| Package | Downloads |
|---|---|
|
I-Synergy.Framework.AspNetCore
I-Synergy Framework AspNetCore |
|
|
I-Synergy.Framework.UI
I-Synergy UI Framework for Windows, Linux, Android and WebAssembly |
|
|
I-Synergy.Framework.OpenTelemetry.Sentry
I-Synergy Framework OpenTelemetry for Sentry |
|
|
I-Synergy.Framework.OpenTelemetry.ApplicationInsights
I-Synergy Framework OpenTelemetry library for ApplicationInsights |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.10618.11702-preview | 0 | 6/18/2026 |
| 2026.10616.12121 | 113 | 6/16/2026 |
| 2026.10616.11904-preview | 97 | 6/16/2026 |
| 2026.10616.10010 | 164 | 6/15/2026 |
| 2026.10615.12240-preview | 160 | 6/15/2026 |
| 2026.10615.10047-preview | 181 | 6/14/2026 |
| 2026.10614.10112-preview | 202 | 6/13/2026 |
| 2026.10612.12341-preview | 230 | 6/12/2026 |
| 2026.10612.12110-preview | 205 | 6/12/2026 |
| 2026.10612.11941-preview | 205 | 6/12/2026 |
| 2026.10610.10831 | 228 | 6/10/2026 |
| 2026.10610.10706-preview-pr... | 222 | 6/10/2026 |
| 2026.10609.11323-preview | 218 | 6/9/2026 |
| 2026.10607.11905-preview | 234 | 6/7/2026 |
| 2026.10607.11454-preview | 210 | 6/7/2026 |
| 2026.10606.11854-preview | 224 | 6/6/2026 |
| 2026.10603.11238-preview | 217 | 6/3/2026 |
| 2026.10602.12203-preview | 210 | 6/2/2026 |
| 2026.10602.11949-preview | 212 | 6/2/2026 |
| 2026.10602.11042-preview | 218 | 6/2/2026 |