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

Provide API for manual Context management #1040

Open
mshustov opened this issue Jun 16, 2021 · 1 comment
Open

Provide API for manual Context management #1040

mshustov opened this issue Jun 16, 2021 · 1 comment

Comments

@mshustov
Copy link

mshustov commented Jun 16, 2021

Hi, I'm from the Kibana team, and I'm working on APM RUM agent integration into Kibana.
In the Kibana use case, when a user opens a dashboard page, Kibana might render several visualizations. Each visualization triggers an async sequence of steps that ends up in a network request to fetch data.
We found out the APM RUM agent doesn't support context propagation when multiple async operations are executed in parallel. So we have to work around this limitation by implementing a custom solution for manual context propagation.
It would be awesome if the APM RUM agent provides API for manual Context management.

// in dashboard code
const context = apm.createContext({ type, id }); // just for a demo purposes
await initDataLoading({ context });
// in http service
apm.startTransaction(...);
apm.bind(context);
await fetch(...) // automatically propagates context via headers
@paulb-elastic
Copy link

In the interests of transparency, we’ve discussed this in refinement and we won’t be able to work on this or plan it in right now, whilst the team are focusing on Synthetics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants