Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NuGet package that wires up OpenTelemetry (tracing, metrics, logging) for
```
src/
Directory.Build.props # Shared props: nullable, implicit usings, warnings-as-errors, style enforced in build
OpenTelemetryExtension.Configuration/ # Library (netstandard2.0 + net10.0) — the shipped NuGet package
OpenTelemetryExtension.Configuration/ # Library (netstandard2.0 + net8.0 + net10.0) — the shipped NuGet package
OpenTelemetryExtension.Configuration.Tests/ # xUnit unit tests (net10.0, in-process, Category=Unit)
OpenTelemetryExtension.Configuration.IntegrationTests/ # Integration tests (net10.0, Category=Integration) — query a live OpenObserve
OpenTelemetryExtension.Configuration.Sample.WebApi/ # ASP.NET Core sample app (net10.0)
Expand Down Expand Up @@ -125,9 +125,12 @@ API to confirm the data was ingested.

- C# with nullable reference types enabled — never use `!` to suppress
nullability without a comment explaining why
- Target frameworks: `netstandard2.0` and `net10.0` — guard net5.0+ APIs with
`#if NET5_0_OR_GREATER`. Do not use APIs unavailable on `netstandard2.0`
without the guard.
- Target frameworks: `netstandard2.0`, `net8.0` and `net10.0` — guard net5.0+
APIs with `#if NET5_0_OR_GREATER` (or `#if !NETSTANDARD2_0`). Do not use APIs
unavailable on `netstandard2.0` without the guard. The ASP.NET Core
instrumentation is referenced for every target except `netstandard2.0`, so
`net8.0` and `net10.0` consumers get it; `netstandard2.0` (WPF/console) stays
lean.
- `src/Directory.Build.props` applies to every project: `Nullable`,
`ImplicitUsings`, `LangVersion=latest`, `TreatWarningsAsErrors=true`,
`EnforceCodeStyleInBuild=true` — a style violation fails the build
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Configurable OpenTelemetry setup for .NET applications providing **tracing, metr

## ✅ Requirements

- A .NET target compatible with **`netstandard2.0`** — i.e. .NET Framework 4.6.1+, .NET 6/8/9/10, or .NET 10 directly.
- A .NET target compatible with **`netstandard2.0`** — i.e. .NET Framework 4.6.1+, .NET 6/8/9/10, or directly the **`net8.0`** / **`net10.0`** builds.
- An **OTLP-compatible backend** to receive the telemetry (collector, Jaeger, OpenObserve, the .NET Aspire Dashboard, …). See [Running Locally with a Backend](#-running-locally-with-a-backend).
- ASP.NET Core instrumentation requires a **web target** (`net10.0` build); it is not included in the `netstandard2.0` build used by WPF/console apps.
- ASP.NET Core instrumentation requires a modern .NET target (**`net8.0`** or **`net10.0`** build); it is not included in the `netstandard2.0` build used by WPF/console apps.

---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net10.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0;net10.0</TargetFrameworks>
<Version>2.0.1</Version>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
Loading