-
Notifications
You must be signed in to change notification settings - Fork 31
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
Pass tracecontext from PDF generator cookies back to app #2747
Pass tracecontext from PDF generator cookies back to app #2747
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Although since this appears to require no hooks, I suppose it does not need to lie in the render function of index? Not completely sure what the best place is either but i guess the closest thing we have to an established pattern for things like this would be something similar to src/features/baseurlinjection
which is just imported directly in the index file
Extracted it into a separate function in a file in |
That looks great, much cleaner |
Are there any good ways to unit-test this stuff? For example a snapshot of how the resulting request headers look like depending on the query parameter and cookies would be nice, not sure if there are similar tests around |
I would probably have made a Cypress test for this. Loading an existing instance with |
4acd06d
to
bbc15a1
Compare
Have you tried running cypress locally? 😅 |
Yeah the normal runner doesn't work for me, probably because I'm in WSL. Managed to run it in Docker but I'm not getting the same error so I think I can't run this locally atm |
…putting it before reloading the page in testPdf. Making the testPdf props an object.
|
Description
When rendering PDF, get W3C
traceparent
propagated by the app and pass it back to the app when making subsequent requests.Backend PR: Altinn/app-lib-dotnet#924
Tested locally using Application Insights both with OTel and the classic App Insights SDK
I don't know what the best place for this code is, but at least it needs to be pretty far upstream so that the interceptor is added before any downstream requests are made.
Related Issue(s)
Verification/QA
kind/*
label to this PR for proper release notes grouping