Skip to content

Async/Await API#2412

Draft
thedrow wants to merge 1 commit intoopen-telemetry:mainfrom
thedrow:patch-1
Draft

Async/Await API#2412
thedrow wants to merge 1 commit intoopen-telemetry:mainfrom
thedrow:patch-1

Conversation

@thedrow
Copy link
Copy Markdown

@thedrow thedrow commented Jan 26, 2022

Description

This PR will contain an API for asynchronously exporting spans, logs and metrics.

Fixes #62

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

It hasn't yet but it will have unit tests and we will test it manually.

Does This PR Require a Contrib Repo Change?

Answer the following question based on these examples of changes that would require a Contrib Repo Change:

  • The OTel specification has changed which prompted this PR to update the method interfaces of opentelemetry-api/ or opentelemetry-sdk/

  • The method interfaces of test/util have changed

  • Scripts in scripts/ that were copied over to the Contrib repo have changed

  • Configuration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in

    • pyproject.toml
    • isort.cfg
    • .flake8
  • When a new .github/CODEOWNER is added

  • Major changes to project information, such as in:

    • README.md
    • CONTRIBUTING.md
  • 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

This will allow us to define asynchronous span exporters, if the span processor will be async as well.
Copy link
Copy Markdown
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

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

I would love to see this issue tackled. I think the tough part is, how do you update the span processors to know if they have a sync or async exporter? I think it would also be useful to have an AsyncBatchSpanProcessor which replaces the background running thread with an async task

@thedrow
Copy link
Copy Markdown
Author

thedrow commented Jan 27, 2022

I would love to see this issue tackled. I think the tough part is, how do you update the span processors to know if they have a sync or async exporter? I think it would also be useful to have an AsyncBatchSpanProcessor which replaces the background running thread with an async task

I agree. The next step would be to define an async span processor. You're welcome to join the effort. It'll be quicker to implement this way.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment.
If you're still working on this, please add a comment or push new commits.

@github-actions github-actions bot added the Stale label Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support async/await syntax

2 participants