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

feat: Inject sentry tracing information for rendered HTML #675

Closed

Conversation

juliusknorr
Copy link
Collaborator

This allows to further trace from page rendering to network requests that are done in javascript.

https://docs.sentry.io/platforms/php/tracing/trace-propagation/custom-instrumentation/#inject-tracing-information-into-rendered-html

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr
Copy link
Collaborator Author

@@ -76,6 +76,9 @@ public function boot(IBootContext $context): void {
'traces_sample_rate' => $config->getSamplingRate(),
'profiles_sample_rate' => $config->getProfilesSamplingRate(),
]);

\OC_Util::addHeader('meta', ['name' => 'baggage', 'content' => \Sentry\getBaggage()]);
Copy link
Owner

Choose a reason for hiding this comment

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

private API 💔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep didn't find a way through the public one, need to think a bit how that could be arranged

Copy link
Owner

Choose a reason for hiding this comment

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

Can we use a global middleware?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We cannot access the template instance from the template response in the middleware, but I have a local draft for extending that API, will check the next days.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Seems I won't find time, let me close this until it becomes more relevant again or anyone else wants to pick up

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