Skip to content

Conversation

@majanjua-amzn
Copy link

@majanjua-amzn majanjua-amzn commented Oct 16, 2025

Fixes: N/A
Design discussion issue: open-telemetry/opentelemetry-specification#4024

Changes

Changes based loosely on the same changes made to opentelemetry-java: open-telemetry/opentelemetry-java#6367

This change creates a new ExtendedBaseProcessor that allows users to implement onEnding functionality to their processor, as per the spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#onending

Specific changes:

  • Changed CompositeProcessor to be extended from the new ExtendedBaseProcessor to support processors that have OnEnding
  • Created new ExtendedBaseProcessor as the place where this functionality is added, so as to not break any current experience of extending the normal BaseProcessor
  • Updated TestActivityProcessor to extend the new OnEnding method while being agnostic to it for tests that don't need it
  • Updated unit tests to verify the running order of the span lifecycle is correct and includes the OnEnding invocation

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)

@majanjua-amzn majanjua-amzn requested a review from a team as a code owner October 16, 2025 22:42
@github-actions github-actions bot added the pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package label Oct 16, 2025
@majanjua-amzn majanjua-amzn force-pushed the main branch 4 times, most recently from 85231aa to e108c44 Compare October 20, 2025 20:46
@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.76%. Comparing base (39faecf) to head (9d85d73).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #6617   +/-   ##
=======================================
  Coverage   86.76%   86.76%           
=======================================
  Files         258      258           
  Lines       11958    11958           
=======================================
  Hits        10375    10375           
  Misses       1583     1583           
Flag Coverage Δ
unittests-UnstableCoreLibraries-Experimental 85.97% <ø> (-0.10%) ⬇️

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

Files with missing lines Coverage Δ
src/OpenTelemetry/CompositeProcessor.cs 95.58% <ø> (ø)
src/OpenTelemetry/Trace/TracerProviderSdk.cs 99.36% <ø> (ø)

@Kielek
Copy link
Member

Kielek commented Oct 21, 2025

This feature is still in development phase. It means that we cannot include it into stable releases for this package.
We have possibility to make it happen for unstable versions.

You can make full search for OTEL1000 in this repository. In this way you can find an example how to implement conditional compilation + required documentation.
OTEL1005 is the first available code at the moment.

Another thing for consideration: double check if it is not breaking change on binary level when you are introducing new class to the inheritance.

@github-actions github-actions bot added infra Infra work - CI/CD, code coverage, linters documentation Documentation related labels Oct 23, 2025
This change creates a new ExtendedBaseProcessor that allows users
to implement onEnding functionality to their processor, as per
the spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#onending
@majanjua-amzn
Copy link
Author

I think I've appropriately added the OTEL1005 label where needed, could I get some help rerunning the workflows to see if there are any other remaining issues?

And regarding the following, is there a way to do so besides just running the build/tests? Thanks in advance

Another thing for consideration: double check if it is not breaking change on binary level when you are introducing new class to the inheritance.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or pushing will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added the Stale Issues and pull requests which have been flagged for closing due to inactivity label Nov 1, 2025
@Kielek Kielek added keep-open Prevents issues and pull requests being closed as stale and removed Stale Issues and pull requests which have been flagged for closing due to inactivity labels Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation related infra Infra work - CI/CD, code coverage, linters keep-open Prevents issues and pull requests being closed as stale pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants