I-Synergy.Framework.OpenTelemetry 2025.11225.12213

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package I-Synergy.Framework.OpenTelemetry --version 2025.11225.12213
                    
NuGet\Install-Package I-Synergy.Framework.OpenTelemetry -Version 2025.11225.12213
                    
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="I-Synergy.Framework.OpenTelemetry" Version="2025.11225.12213" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="I-Synergy.Framework.OpenTelemetry" Version="2025.11225.12213" />
                    
Directory.Packages.props
<PackageReference Include="I-Synergy.Framework.OpenTelemetry" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add I-Synergy.Framework.OpenTelemetry --version 2025.11225.12213
                    
#r "nuget: I-Synergy.Framework.OpenTelemetry, 2025.11225.12213"
                    
#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.
#:package I-Synergy.Framework.OpenTelemetry@2025.11225.12213
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=I-Synergy.Framework.OpenTelemetry&version=2025.11225.12213
                    
Install as a Cake Addin
#tool nuget:?package=I-Synergy.Framework.OpenTelemetry&version=2025.11225.12213
                    
Install as a Cake Tool

OpenTelemetry Integration Guide

Overview

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.

Key Concepts

  • Instrumentation: Defines what to collect (which libraries, frameworks, or custom sources to monitor)
  • Exporters: Defines where to send the collected telemetry data (console, OTLP endpoint, Azure Monitor, etc.)

Architecture

The OpenTelemetry integration in I-Synergy.Framework consists of:

  • ITelemetryProvider interface that defines the contract
  • OpenTelemetryProvider implementation
  • Extension methods for different provider builders (Tracer, Meter, Logger)

Usage Guide

Basic Setup

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

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

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;
    });
}

Integration Examples

Azure Monitor Integration
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);
            });
        }
    });
Sentry Integration
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();
        });
    });

Advanced Configuration

Manual Instrumentation

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

Custom Resource Attributes

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 Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.10105.11358-preview 147 1/5/2026
2026.10105.11229-preview 149 1/5/2026
2025.11231.11750-preview 171 12/31/2025
2025.11225.12213 249 12/25/2025
2025.11225.12003-preview 254 12/25/2025
2025.11218.11301 336 12/18/2025
2025.11218.10050-preview 343 12/18/2025
2025.11211.11307-preview 477 12/11/2025
2025.11211.11225-preview 469 12/11/2025
2025.11210.10145-preview 491 12/10/2025
2025.11209.11459 504 12/9/2025
2025.11209.11422-preview 502 12/9/2025
2025.11207.11553-preview 271 12/7/2025
2025.11204.11448-preview 255 12/4/2025
2025.11130.12248 491 11/30/2025
2025.11130.12134-preview 411 11/30/2025
2025.11130.11725-preview 418 11/30/2025
2025.11130.11553-preview 412 11/30/2025
2025.11130.11515-preview 414 11/30/2025
2025.11130.11420.59-preview 422 11/30/2025
2025.11130.11323.56-preview 320 11/30/2025
2025.11129.10227.14-preview 178 11/29/2025
2025.11120.10114 515 11/20/2025
2025.11119.10110 496 11/19/2025
2025.11118.12340.33-preview 486 11/18/2025
2025.11117.12349.4-preview 455 11/17/2025
2025.11117.11937.47-preview 456 11/17/2025
2025.11113.11532.29-preview 350 11/13/2025
2025.11113.10128.57-preview 343 11/13/2025
2025.11110.10306.55-preview 297 11/10/2025
2025.11109.10018.48-preview 195 11/8/2025
2025.11108.10119.29-preview 178 11/8/2025
2025.11106.10037.1-preview 255 11/6/2025
2025.11105.10254.54-preview 254 11/5/2025
2025.11105.10141.16-preview 248 11/5/2025
2025.11104.12308.54-preview 245 11/4/2025
2025.11104.10144.47-preview 256 11/4/2025
2025.11102.12003.8-preview 247 11/2/2025
2025.11102.11228.52-preview 241 11/2/2025
2025.11102.10309.42-preview 184 11/2/2025
2025.11029.11433.38-preview 246 10/29/2025
2025.11029.10201.38-preview 233 10/29/2025
2025.11027.11947.55-preview 245 10/27/2025
2025.11022.12207.12-preview 226 10/22/2025
2025.11019.12053.37-preview 215 10/19/2025
2025.11016.11750.24-preview 224 10/16/2025
2025.11015.10219.44-preview 222 10/15/2025
2025.11014.10245.12-preview 219 10/14/2025
2025.11012.10130.11-preview 225 10/12/2025
2025.11010.10052.52-preview 293 10/9/2025
2025.11001.12118.13-preview 296 10/1/2025
2025.10925.10144.25-preview 333 9/25/2025
2025.10921.11353.29-preview 338 9/21/2025
2025.10913.11841.29-preview 263 9/13/2025
2025.10912.12351.59-preview 210 9/12/2025
2025.10912.10210.52-preview 283 9/12/2025
2025.10911.10131.43-preview 276 9/10/2025
2025.10910.12340.34-preview 288 9/10/2025
2025.10910.11327.15-preview 281 9/10/2025
2025.10910.11206.45-preview 295 9/10/2025
2025.10910.10230.58-preview 286 9/10/2025
2025.10908.12343.47-preview 307 9/8/2025
2025.10904.12337.35-preview 315 9/4/2025
2025.10904.12245.51-preview 320 9/4/2025
2025.10904.11425.5-preview 313 9/4/2025
2025.10904.10323.39-preview 324 9/4/2025
2025.10826.11425.3-preview 383 8/26/2025
2025.10825.12350.9-preview 321 8/25/2025
2025.10810.10248-preview 269 8/10/2025
2025.10809.10146.35-preview 315 8/9/2025
2025.10806.12031.49-preview 385 8/6/2025
2025.10806.11955.54-preview 377 8/6/2025
2025.10806.11433.24-preview 389 8/6/2025
2025.10709.10105.39-preview 303 7/8/2025
2025.10707.12320.3-preview 314 7/7/2025
2025.10706.11957.9-preview 309 7/6/2025
2025.10702.11752.47-preview 304 7/2/2025
2025.10702.11256.17-preview 316 7/2/2025
2025.10702.11119.10-preview 305 7/2/2025
2025.10702.10000.31-preview 306 7/1/2025
2025.10701.11524.1-preview 313 7/1/2025
2025.10701.11310.13-preview 303 7/1/2025
2025.10630.12022.58-preview 299 6/30/2025
2025.10612.12134.8-preview 486 6/12/2025
2025.10611.12313.53-preview 423 6/11/2025
2025.10603.10159.54-preview 254 6/3/2025
2025.10602.11908.9-preview 267 6/2/2025
2025.10601.10124.29-preview 208 5/31/2025
2025.10531.12235.29-preview 216 5/31/2025
2025.10530.10121.50-preview 261 5/29/2025
2025.10527.12202.4-preview 267 5/27/2025
2025.10526.12034.25-preview 259 5/26/2025
2025.10521.11828.30-preview 269 5/21/2025
2025.10520.11715.6-preview 274 5/20/2025
2025.10520.11515.16-preview 267 5/20/2025
2025.10518.12303.43-preview 267 5/18/2025
2025.10518.11257.36-preview 273 5/18/2025
2025.10517.12347.27-preview 222 5/17/2025
2025.10517.12003.6-preview 223 5/17/2025
2025.10516.11720.13-preview 297 5/16/2025
2025.10514.12334.2-preview 356 5/14/2025
2025.10514.10015.27-preview 352 5/13/2025
2025.10511.11032.32-preview 304 5/11/2025