Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyblasczyk committed Sep 25, 2024
1 parent d0edeb2 commit e431788
Show file tree
Hide file tree
Showing 5 changed files with 626 additions and 256 deletions.
1 change: 1 addition & 0 deletions apps/webservice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@opentelemetry/instrumentation": "^0.53.0",
"@opentelemetry/instrumentation-pg": "^0.44.0",
"@opentelemetry/sdk-logs": "^0.53.0",
"@opentelemetry/sdk-trace-node": "^1.26.0",
"@t3-oss/env-nextjs": "catalog:",
"@tabler/icons-react": "^3.17.0",
"@tailwindcss/typography": "^0.5.13",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const DeploymentOptionsDropdown: React.FC<{
Edit
</DropdownMenuItem>
</EditDeploymentDialog>
<DropdownMenuItem onSelect={(e) => e.preventDefault()}>
<DropdownMenuItem onSelect={() => setDeleteDialogOpen(true)}>
<IconTrash className="mr-2" />
Delete
</DropdownMenuItem>
Expand Down
2 changes: 0 additions & 2 deletions apps/webservice/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { redirect } from "next/navigation";
import { auth } from "@ctrlplane/auth";

import { api } from "~/trpc/server";
import { register } from "../instrumentation";

export default async function SystemPage() {
const session = await auth();
Expand All @@ -16,6 +15,5 @@ export default async function SystemPage() {
const workspace = await api.workspace.byId(user.activeWorkspaceId);
if (workspace != null) redirect(`/${workspace.slug}`);
}
register();
redirect(`/${workspaces[0]!.slug}`);
}
5 changes: 5 additions & 0 deletions apps/webservice/src/instrumentation.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { registerInstrumentations } from "@opentelemetry/instrumentation";
import { PgInstrumentation } from "@opentelemetry/instrumentation-pg";
import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
import { registerOTel } from "@vercel/otel";

export function register() {
registerOTel({ serviceName: "ctrlplane/webservice" });

const provider = new NodeTracerProvider();
provider.register();

registerInstrumentations({
instrumentations: [
new PgInstrumentation({
Expand Down
Loading

0 comments on commit e431788

Please sign in to comment.