Skip to content

Commit

Permalink
fix: Remove incorrect usage from flask helper example (#1434)
Browse files Browse the repository at this point in the history
  • Loading branch information
BYK authored May 5, 2022
1 parent adbe26f commit e08e3f5
Showing 1 changed file with 22 additions and 26 deletions.
48 changes: 22 additions & 26 deletions examples/tracing/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,51 +1,47 @@
<meta name="sentry-trace" content="{{ sentry_trace }}" />
<script src="https://browser.sentry-cdn.com/6.17.7/bundle.js" crossorigin="anonymous"></script>
{{ sentry_trace }}
<script
src="https://browser.sentry-cdn.com/6.17.7/bundle.js"
crossorigin="anonymous"
></script>
<!-- TODO: Replace with real tracing integration once it's fixed -->
<script src="/static/tracing.js" crossorigin="anonymous"></script>

<script>



Sentry.init({
Sentry.init({
dsn: "{{ sentry_dsn }}",
integrations: [
new Sentry.Integrations.Tracing({ tracingOrigins: ['']})
],
debug: true
});
integrations: [new Sentry.Integrations.Tracing({tracingOrigins: [""]})],
debug: true,
});

async function compute() {
async function compute() {
const res = await fetch(
"/compute/" +
document.getElementsByName('b64str')[0].value
"/compute/" + document.getElementsByName("b64str")[0].value,
);

const token = await res.text();
wait(token);

return false;
}
}

async function wait(token) {
async function wait(token) {
const res = await fetch("/wait/" + token);
const line = await res.text();
document.getElementById('output').innerHTML += line;
document.getElementById('output').innerHTML += '<br>';
document.getElementById("output").innerHTML += line;
document.getElementById("output").innerHTML += "<br>";

if(line == "NONE") {
window.setTimeout(function() { wait(token) }, 500);
if (line == "NONE") {
window.setTimeout(function () {
wait(token);
}, 500);
}
}

}
</script>


<p>Decode your base64 string as a service (that calls another service)</p>

<input value='aGVsbG8gd29ybGQK' name=b64str> A base64 string<br>
<input type=button value=submit onclick="compute()">
<input value="aGVsbG8gd29ybGQK" name="b64str" /> A base64 string<br />
<input type="button" value="submit" onclick="compute()" />

<p>Output:</p>
<pre id=output />
<pre id="output" />

0 comments on commit e08e3f5

Please sign in to comment.