Skip to content

Commit

Permalink
esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
tubone24 committed Mar 11, 2024
1 parent 6e3e099 commit e9cfdaa
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions functions/src/cors-proxy-github.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import axios from "axios";
import * as Sentry from "@sentry/node";
import "@sentry/tracing";
// import * as Sentry from "@sentry/node";
// import "@sentry/tracing";
import { ProfilingIntegration } from "@sentry/profiling-node";

Sentry.init({
dsn: "https://[email protected]/6347154",
tracesSampleRate: 1.0,
integrations: [new ProfilingIntegration()],
profilesSampleRate: 1.0,
});
// Sentry.init({
// dsn: "https://[email protected]/6347154",
// tracesSampleRate: 1.0,
// integrations: [new ProfilingIntegration()],
// profilesSampleRate: 1.0,
// });

const transaction = Sentry.startTransaction({
op: "blog",
name: "github cors transaction",
});
// const transaction = Sentry.startTransaction({
// op: "blog",
// name: "github cors transaction",
// });

exports.handler = (event, context) => {
console.log(context);
Expand All @@ -32,7 +32,7 @@ exports.handler = (event, context) => {
token_type: response.data.token_type,
scope: response.data.scope,
});
transaction.finish();
// transaction.finish();
return {
statusCode: 200,
body: JSON.stringify({
Expand All @@ -43,8 +43,8 @@ exports.handler = (event, context) => {
};
})
.catch((error) => {
Sentry.captureException(error);
transaction.finish();
// Sentry.captureException(error);
// transaction.finish();
return {
statusCode: 500,
body: JSON.stringify({ error }),
Expand Down

0 comments on commit e9cfdaa

Please sign in to comment.