feat(flask): Add sentry_trace() template helper#1336
feat(flask): Add sentry_trace() template helper#1336sl0thentr0py merged 22 commits intogetsentry:masterfrom BYK:byk/feat/flask-sentry-trace-template-helper
sentry_trace() template helper#1336Conversation
To setup distributed tracing links between a Flask app and a front-end app, one needs to figure out how to get the current hub, safely get the traceparent and then properly pass it into a template and then finally use that properly in a `meta` tag. [The guide](https://docs.sentry.io/platforms/javascript/performance/connect-services/) is woefully inadequete and error-prone so this PR adds a built-in helper `sentry_trace()` to the Flask integration to simplfy this linking.
|
@BYK the tests on py3.4/old flask versions fail because there's no |
|
hmm no ignore that, |
|
@sl0thentr0py I figured out the issue here. It's what @untitaker said. |
|
@silent1mezzo finally, ready to merge. Sorry for all that noise! |
|
@untitaker @mitsuhiko @sl0thentr0py I don't think that |
|
@sl0thentr0py it won't because this is set to run on But I can only push to my own repo. |
|
yea we need to kill that |
How do you release with Craft then? |
|
@sl0thentr0py see item 3 here: https://github.com/getsentry/publish#setup Either you no longer have admin permissions, or you folks started using the "Allow specific actors to bypass pull request requirements" in branch protection rules (which means that README on publish needs to be updated), or you'll have trouble when you try to make the next release 😀 |
|
We might want to do something similar for django as well. See: #1171 |
|
@AbhiPrasad if only Functional Software Inc. was still paying me... 😛 |
Well if ever get the itch to help out, opened #1341 to track. Thanks for your help BYK, glad to see you're still around :) |

To setup distributed tracing links between a Flask app and a front-end app, one needs to figure out how to get the current hub, safely get the traceparent and then properly pass it into a template and then finally use that properly in a
metatag. The guide is woefully inadequate and error-prone so this PR adds a built-in helpersentry_trace()to the Flask integration to simplify this linking.I'll follow up with documentation updates once the approach here is approved.