impress-2020/pages/api/allWakaValues.js
Matchu 19f1ec092e Turn on Honeycomb instrumentation again
Well, instrumentation seems to be working fine again! The bug we ran into during commit e5081dab7e is gone. Cool!

I want to be able to see what's making the new box slow. My hypothesis was (and it seems to be right) that communication with the database on the Classic DTI server is slow.

But now that they're on the same Linode account and region, I think I can set up a private VLAN to make them muuuch faster. We'll try it out!
2021-11-26 23:41:22 -08:00

28 lines
879 B
JavaScript

const beeline = require("honeycomb-beeline")({
writeKey: process.env["HONEYCOMB_WRITE_KEY"],
dataset:
process.env["NODE_ENV"] === "production"
? "Dress to Impress (2020)"
: "Dress to Impress (2020, dev)",
serviceName: "impress-2020-gql-server",
});
async function handle(req, res) {
res.setHeader("Content-Type", "text/plain; charset=utf8");
res
.status(410)
.send(
"WakaGuide.com is no longer updating its values, so we no longer " +
"serve them from this endpoint. The most recent set of values is " +
"archived here: https://docs.google.com/spreadsheets/d/1DRMrniTSZP0sgZK6OAFFYqpmbT6xY_Ve_i480zghOX0"
);
}
async function handleWithBeeline(req, res) {
beeline.withTrace(
{ name: "api/allWakaValues", operation_name: "api/allWakaValues" },
() => handle(req, res)
);
}
export default handleWithBeeline;