Skip to content

Commit

Permalink
chore: add highlight for otel instrumentation (#1973)
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity authored Jan 9, 2025
1 parent 7bea0ff commit 9718ae1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
14 changes: 11 additions & 3 deletions packages/fern-docs/bundle/src/instrumentation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import { registerOTel } from "@vercel/otel";
import { OTLPHttpJsonTraceExporter, registerOTel } from "@vercel/otel";

export function register(): void {
registerOTel({ serviceName: "fern-docs" });
export function register() {
registerOTel({
serviceName: "fern-docs",
traceExporter: new OTLPHttpJsonTraceExporter({
url: "https://otel.highlight.io:4318/v1/traces",
}),
attributes: {
"highlight.project_id": process.env.HIGHLIGHT_PROJECT_ID_FERN_APP,
},
});
}
3 changes: 2 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
"VERCEL_ENV",
"VERCEL_URL",
"WORKOS_API_KEY",
"WORKOS_CLIENT_ID"
"WORKOS_CLIENT_ID",
"HIGHLIGHT_PROJECT_ID_FERN_APP"
]
}
},
Expand Down

0 comments on commit 9718ae1

Please sign in to comment.