Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return the context in ProcessBatch #106

Closed
wants to merge 1 commit into from

Conversation

dmathieu
Copy link
Member

@dmathieu dmathieu commented Jul 5, 2023

Right now, processors can't communicate with each other, which is something I need to do to start doing tracing within them.
By returning a context after ProcessBatch, the processor can change the context and return a new one, which will be used by every underlying processor.

With that, processors will be able to communicate with each other, and more specifically, one will be able to start a span, and another one to finish it (and possibly every other one, to retrieve the span in context and add attributes).

@dmathieu dmathieu requested a review from a team July 5, 2023 15:46
@axw
Copy link
Member

axw commented Jul 6, 2023

Before we go ahead with this, can you show how it would be used with a code example? Is it possible to do this by wrapping, rather than chaining?

@dmathieu
Copy link
Member Author

dmathieu commented Jul 6, 2023

You are right, using a wrapper processor is a better solution.
Closing in favor of elastic/apm-server#11156

@dmathieu dmathieu closed this Jul 6, 2023
@dmathieu dmathieu deleted the processbatch-ctx branch July 6, 2023 08:28
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.

2 participants