Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
dromzeh committed May 28, 2024
1 parent e973363 commit cd0d7e8
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import { router } from "@/handler";
import { instrument, ResolveConfigFn } from "@microlabs/otel-cf-workers";
// import { instrument, ResolveConfigFn } from "@microlabs/otel-cf-workers";

const handler = {
fetch: router.handle,
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const config: ResolveConfigFn = (env: Env, _trigger) => {
return {
exporter: {
url: "https://otel.baselime.io/v1",
headers: { "x-api-key": env.BASELIME_API_KEY },
},
service: { name: env.SERVICE_NAME },
};
};
// // eslint-disable-next-line @typescript-eslint/no-unused-vars
// const config: ResolveConfigFn = (env: Env, _trigger) => {
// return {
// exporter: {
// url: "https://otel.baselime.io/v1",
// headers: { "x-api-key": env.BASELIME_API_KEY },
// },
// service: { name: env.SERVICE_NAME },
// };
// };

// export default instrument(handler, config);

export default instrument(handler, config);
export default handler;

0 comments on commit cd0d7e8

Please sign in to comment.