Skip to content

Commit

Permalink
fix: tracer token format
Browse files Browse the repository at this point in the history
  • Loading branch information
tschoffelen committed Sep 7, 2024
1 parent 8b6ef81 commit b28e09c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/deploy-script/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "@aws-sdk/client-apigatewayv2";

// TODO: use previous token if it exists
const tracerToken = crypto.randomBytes(16).toString("hex");
const tracerToken = `t_${crypto.randomBytes(16).toString("hex")}`;

const exec = (command, options = {}) => {
const child = child_process.exec(command, {
Expand Down Expand Up @@ -121,8 +121,9 @@ console.log(chalk.blue("Deploying..."));
await exec("yarn deploy", { cwd: "/tmp/trace-stack" });

// Run auto-trace
console.log(chalk.blue("Auto tracing lambdas..."));
const endpoint = await getApiEndpoint();
await fetch(`https://${endpoint}/api/auto-trace`, {
fetch(`https://${endpoint}/api/auto-trace`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ token: tracerToken }),
Expand Down

0 comments on commit b28e09c

Please sign in to comment.