Skip to content

Conversation

@xrmx
Copy link
Contributor

@xrmx xrmx commented Nov 12, 2025

Description

Make it easier for distributions to override the processors set up by the sdk configurator by specifying a span processor and a log record processor.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • tox

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

…tion

Make it easier for distributions to override the processors set up by
the sdk configurator by specifying a span processor and a log record
processor.
@xrmx xrmx requested a review from a team as a code owner November 12, 2025 11:09
exporter_args = exporter_args_map.get(exporter_class, {})
provider.add_span_processor(
BatchSpanProcessor(exporter_class(**exporter_args))
span_processor(exporter_class(**exporter_args))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is failing pyright check because Type[SpanProcessor] does not impose a constructor that takes an exporter as first parameter. Need to type that I guess.

id_generator: IdGenerator | None = None,
setup_logging_handler: bool | None = None,
exporter_args_map: ExporterArgsMap | None = None,
span_processor: Type[SpanProcessor] | None = None,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the same for every exporter, is it enough or we want to make it per exporter?

@xrmx xrmx requested a review from jeremydvoss November 13, 2025 09:44
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.

1 participant