Skip to content

fix: remove PerRequestSpanProcessor from public API - #47

Merged
Hector Hernandez (hectorhdzg) merged 6 commits into
microsoft:mainfrom
hectorhdzg:fix/remove-per-request-span-processor-public-api
Apr 23, 2026
Merged

Hector Hernandez (hectorhdzg) merged 6 commits into
microsoft:mainfrom
hectorhdzg:fix/remove-per-request-span-processor-public-api

Conversation

@hectorhdzg

Copy link
Copy Markdown
Member

PerRequestSpanProcessor was an internal implementation detail built for a single partner and was never intended to be part of the public surface.

Changes:

  • Delete PerRequestSpanProcessor and PerRequestSpanProcessorOptions
  • Remove perRequestExport option from A365Options and A365Configuration
  • Remove ENABLE_A365_OBSERVABILITY_PER_REQUEST_EXPORT env var support
  • Distro always uses BatchSpanProcessor for A365 export
  • Export Agent365Exporter, Agent365ExporterOptions, TokenResolver publicly so callers can build custom span processor pipelines if needed
  • Update MIGRATION_A365.md with a 'Custom Span Export' workaround section

Fixes #40

PerRequestSpanProcessor was an internal implementation detail built for
a single partner and was never intended to be part of the public surface.

Changes:
- Delete PerRequestSpanProcessor and PerRequestSpanProcessorOptions
- Remove perRequestExport option from A365Options and A365Configuration
- Remove ENABLE_A365_OBSERVABILITY_PER_REQUEST_EXPORT env var support
- Distro always uses BatchSpanProcessor for A365 export
- Export Agent365Exporter, Agent365ExporterOptions, TokenResolver publicly
  so callers can build custom span processor pipelines if needed
- Update MIGRATION_A365.md with a 'Custom Span Export' workaround section
- Update README to remove perRequestExport docs
- Update CHANGELOG

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the A365 PerRequestSpanProcessor (and related configuration) from the public surface area, standardizing A365 exporting on batch processing while making Agent365Exporter publicly available for callers who need custom span processor pipelines.

Changes:

  • Deleted PerRequestSpanProcessor + options and removed perRequestExport from A365Options/A365Configuration (and removed the related env var).
  • Updated distro initialization to always use BatchSpanProcessor for A365 export.
  • Exposed Agent365Exporter, Agent365ExporterOptions, and TokenResolver publicly; updated README/migration/changelog accordingly.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/internal/unit/a365/perRequestSpanProcessor.test.ts Removed unit tests for the deleted PerRequestSpanProcessor.
test/internal/unit/a365/a365Configuration.test.ts Removed assertions and cases for perRequestExport and its env var constant.
src/index.ts Removed PerRequestSpanProcessor from root exports; added public exports for Agent365Exporter + types.
src/distro/distro.ts Simplified A365 setup to always attach BatchSpanProcessor for A365 export.
src/a365/processors/index.ts Stopped exporting PerRequestSpanProcessor and its options.
src/a365/processors/PerRequestSpanProcessor.ts Deleted the per-request processor implementation.
src/a365/index.ts Stopped re-exporting the per-request processor from the A365 module.
src/a365/configuration/A365ConfigurationOptions.ts Removed perRequestExport from A365Options.
src/a365/configuration/A365Configuration.ts Removed perRequestExport resolution and env var support.
README.md Removed perRequestExport and its env var from documented A365 configuration.
MIGRATION_A365.md Removed per-request export references; added “Custom Span Export” workaround guidance.
CHANGELOG.md Documented breaking change removal + new public exporter exports.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread MIGRATION_A365.md Outdated
Comment thread MIGRATION_A365.md Outdated
Comment thread src/index.ts
Comment thread MIGRATION_A365.md
@hectorhdzg
Hector Hernandez (hectorhdzg) merged commit 26aed78 into microsoft:main Apr 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configuration for PerRequestSpanProcessor should not be exposed publicly

3 participants