Skip to content

[Extensions.Enrichment] Add exception handling to trace enrichment#4165

Merged
martincostello merged 5 commits intoopen-telemetry:mainfrom
ysolomchenko:Trace-enrichment-callbacks-lack-exception-handling
Apr 21, 2026
Merged

[Extensions.Enrichment] Add exception handling to trace enrichment#4165
martincostello merged 5 commits intoopen-telemetry:mainfrom
ysolomchenko:Trace-enrichment-callbacks-lack-exception-handling

Conversation

@ysolomchenko
Copy link
Copy Markdown
Contributor

Fixes # N/A
Design discussion issue # N/A

Found by Codex analysis

Changes

Fixed trace enrichment callbacks so exceptions thrown by user-provided enrichers or enrichment actions no longer interrupt trace processing.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@github-actions github-actions Bot added the comp:extensions.enrichment Things related to OpenTelemetry.Extensions.Enrichment label Apr 21, 2026
@ysolomchenko ysolomchenko marked this pull request as ready for review April 21, 2026 07:54
@ysolomchenko ysolomchenko requested a review from a team as a code owner April 21, 2026 07:54
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.92%. Comparing base (b4c4b44) to head (06c17e1).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4165      +/-   ##
==========================================
+ Coverage   73.74%   73.92%   +0.17%     
==========================================
  Files         466      459       -7     
  Lines       18314    18304      -10     
==========================================
+ Hits        13506    13531      +25     
+ Misses       4808     4773      -35     
Flag Coverage Δ
unittests-Extensions 90.78% <ø> (ø)
unittests-Extensions.Enrichment 100.00% <100.00%> (ø)
unittests-Instrumentation.Cassandra ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...sions.Enrichment/Internal/EnrichmentEventSource.cs 100.00% <100.00%> (ø)
...ions.Enrichment/Internal/TraceEnrichmentActions.cs 100.00% <100.00%> (ø)
...ns.Enrichment/Internal/TraceEnrichmentProcessor.cs 100.00% <100.00%> (ø)

... and 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/OpenTelemetry.Extensions.Enrichment/Internal/TraceEnrichmentActions.cs Outdated
Comment thread src/OpenTelemetry.Extensions.Enrichment/Internal/EnrichmentEventSource.cs Outdated
ysolomchenko and others added 2 commits April 21, 2026 11:57
@martincostello martincostello added this pull request to the merge queue Apr 21, 2026
Merged via the queue into open-telemetry:main with commit 66c065c Apr 21, 2026
79 checks passed
intellitect-bot pushed a commit to IntelliTect/EssentialCSharp.Web that referenced this pull request Apr 22, 2026
Updated
[OpenTelemetry.Instrumentation.Runtime](https://github.com/open-telemetry/opentelemetry-dotnet-contrib)
from 1.15.0 to 1.15.1.

<details>
<summary>Release notes</summary>

_Sourced from [OpenTelemetry.Instrumentation.Runtime's
releases](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/releases)._

## 1.15.1

* NuGet: [OpenTelemetry.Instrumentation.AspNet
v1.15.1](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNet/1.15.1)

   No notable changes.

See
[CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.AspNet-1.15.1/src/OpenTelemetry.Instrumentation.AspNet/CHANGELOG.md)
for details.
* NuGet: [OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule
v1.15.1](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule/1.15.1)

  * Propagate baggage before `Activity` is created.

([#​3820](open-telemetry/opentelemetry-dotnet-contrib#3820))

See
[CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.AspNet-1.15.1/src/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule/CHANGELOG.md)
for details.


## 1.15.1-beta.2

* NuGet: [OpenTelemetry.Instrumentation.Wcf
v1.15.1-beta.2](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.Wcf/1.15.1-beta.2)

* Revert `System.Security.Cryptography.Xml` dependency version update
for
.NET 8, 9, and 10 to `4.7.1` released in 1.15.1-beta.1 introduced in
[#​4103](open-telemetry/opentelemetry-dotnet-contrib#4103).

([#​4266](open-telemetry/opentelemetry-dotnet-contrib#4266))

See
[CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.Wcf-1.15.1-beta.2/src/OpenTelemetry.Instrumentation.Wcf/CHANGELOG.md)
for details.


## 1.15.1-beta.1

* NuGet: [OpenTelemetry.Extensions.Enrichment
v1.15.1-beta.1](https://www.nuget.org/packages/OpenTelemetry.Extensions.Enrichment/1.15.1-beta.1)

  * Updated OpenTelemetry core component version(s) to `1.15.3`.

([#​4166](open-telemetry/opentelemetry-dotnet-contrib#4166))
  
* Fixed trace enrichment callbacks so exceptions thrown by user-provided
enrichers or enrichment actions no longer interrupt trace processing.

([#​4165](open-telemetry/opentelemetry-dotnet-contrib#4165))

See
[CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Extensions.Enrichment-1.15.1-beta.1/src/OpenTelemetry.Extensions.Enrichment/CHANGELOG.md)
for details.


## 1.15.1-alpha.1

* NuGet: [OpenTelemetry.Instrumentation.EventCounters
v1.15.1-alpha.1](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.EventCounters/1.15.1-alpha.1)

  * Updated OpenTelemetry core component version(s) to `1.15.3`.

([#​4166](open-telemetry/opentelemetry-dotnet-contrib#4166))

See
[CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.EventCounters-1.15.1-alpha.1/src/OpenTelemetry.Instrumentation.EventCounters/CHANGELOG.md)
for details.


Commits viewable in [compare
view](open-telemetry/opentelemetry-dotnet-contrib@Exporter.OneCollector-1.15.0...Instrumentation.AspNet-1.15.1).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=OpenTelemetry.Instrumentation.Runtime&package-manager=nuget&previous-version=1.15.0&new-version=1.15.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:extensions.enrichment Things related to OpenTelemetry.Extensions.Enrichment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants