Skip to content

Commit 3b5fc0f

Browse files
authored
feat(sdk-playground): use otel integration for the sdk playground (#32)
1 parent a35bcec commit 3b5fc0f

File tree

8 files changed

+970
-2
lines changed

8 files changed

+970
-2
lines changed
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
/* eslint-disable */
2+
3+
// @ts-nocheck
4+
5+
// noinspection JSUnusedGlobalSymbols
6+
7+
// This file was automatically generated by TanStack Router.
8+
// You should NOT make any changes in this file as it will be overwritten.
9+
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
10+
11+
import { Route as rootRouteImport } from "./routes/__root";
12+
import { Route as TelemetryRouteRouteImport } from "./routes/telemetry.route";
13+
import { Route as ReconnectRouteRouteImport } from "./routes/reconnect.route";
14+
import { Route as DataVisualizationRouteRouteImport } from "./routes/data-visualization.route";
15+
import { Route as AnalyticsRouteRouteImport } from "./routes/analytics.route";
16+
import { Route as IndexRouteImport } from "./routes/index";
17+
18+
const TelemetryRouteRoute = TelemetryRouteRouteImport.update({
19+
id: "/telemetry",
20+
path: "/telemetry",
21+
getParentRoute: () => rootRouteImport,
22+
} as any);
23+
const ReconnectRouteRoute = ReconnectRouteRouteImport.update({
24+
id: "/reconnect",
25+
path: "/reconnect",
26+
getParentRoute: () => rootRouteImport,
27+
} as any);
28+
const DataVisualizationRouteRoute = DataVisualizationRouteRouteImport.update({
29+
id: "/data-visualization",
30+
path: "/data-visualization",
31+
getParentRoute: () => rootRouteImport,
32+
} as any);
33+
const AnalyticsRouteRoute = AnalyticsRouteRouteImport.update({
34+
id: "/analytics",
35+
path: "/analytics",
36+
getParentRoute: () => rootRouteImport,
37+
} as any);
38+
const IndexRoute = IndexRouteImport.update({
39+
id: "/",
40+
path: "/",
41+
getParentRoute: () => rootRouteImport,
42+
} as any);
43+
44+
export interface FileRoutesByFullPath {
45+
"/": typeof IndexRoute;
46+
"/analytics": typeof AnalyticsRouteRoute;
47+
"/data-visualization": typeof DataVisualizationRouteRoute;
48+
"/reconnect": typeof ReconnectRouteRoute;
49+
"/telemetry": typeof TelemetryRouteRoute;
50+
}
51+
export interface FileRoutesByTo {
52+
"/": typeof IndexRoute;
53+
"/analytics": typeof AnalyticsRouteRoute;
54+
"/data-visualization": typeof DataVisualizationRouteRoute;
55+
"/reconnect": typeof ReconnectRouteRoute;
56+
"/telemetry": typeof TelemetryRouteRoute;
57+
}
58+
export interface FileRoutesById {
59+
__root__: typeof rootRouteImport;
60+
"/": typeof IndexRoute;
61+
"/analytics": typeof AnalyticsRouteRoute;
62+
"/data-visualization": typeof DataVisualizationRouteRoute;
63+
"/reconnect": typeof ReconnectRouteRoute;
64+
"/telemetry": typeof TelemetryRouteRoute;
65+
}
66+
export interface FileRouteTypes {
67+
fileRoutesByFullPath: FileRoutesByFullPath;
68+
fullPaths:
69+
| "/"
70+
| "/analytics"
71+
| "/data-visualization"
72+
| "/reconnect"
73+
| "/telemetry";
74+
fileRoutesByTo: FileRoutesByTo;
75+
to: "/" | "/analytics" | "/data-visualization" | "/reconnect" | "/telemetry";
76+
id:
77+
| "__root__"
78+
| "/"
79+
| "/analytics"
80+
| "/data-visualization"
81+
| "/reconnect"
82+
| "/telemetry";
83+
fileRoutesById: FileRoutesById;
84+
}
85+
export interface RootRouteChildren {
86+
IndexRoute: typeof IndexRoute;
87+
AnalyticsRouteRoute: typeof AnalyticsRouteRoute;
88+
DataVisualizationRouteRoute: typeof DataVisualizationRouteRoute;
89+
ReconnectRouteRoute: typeof ReconnectRouteRoute;
90+
TelemetryRouteRoute: typeof TelemetryRouteRoute;
91+
}
92+
93+
declare module "@tanstack/react-router" {
94+
interface FileRoutesByPath {
95+
"/telemetry": {
96+
id: "/telemetry";
97+
path: "/telemetry";
98+
fullPath: "/telemetry";
99+
preLoaderRoute: typeof TelemetryRouteRouteImport;
100+
parentRoute: typeof rootRouteImport;
101+
};
102+
"/reconnect": {
103+
id: "/reconnect";
104+
path: "/reconnect";
105+
fullPath: "/reconnect";
106+
preLoaderRoute: typeof ReconnectRouteRouteImport;
107+
parentRoute: typeof rootRouteImport;
108+
};
109+
"/data-visualization": {
110+
id: "/data-visualization";
111+
path: "/data-visualization";
112+
fullPath: "/data-visualization";
113+
preLoaderRoute: typeof DataVisualizationRouteRouteImport;
114+
parentRoute: typeof rootRouteImport;
115+
};
116+
"/analytics": {
117+
id: "/analytics";
118+
path: "/analytics";
119+
fullPath: "/analytics";
120+
preLoaderRoute: typeof AnalyticsRouteRouteImport;
121+
parentRoute: typeof rootRouteImport;
122+
};
123+
"/": {
124+
id: "/";
125+
path: "/";
126+
fullPath: "/";
127+
preLoaderRoute: typeof IndexRouteImport;
128+
parentRoute: typeof rootRouteImport;
129+
};
130+
}
131+
}
132+
133+
const rootRouteChildren: RootRouteChildren = {
134+
IndexRoute: IndexRoute,
135+
AnalyticsRouteRoute: AnalyticsRouteRoute,
136+
DataVisualizationRouteRoute: DataVisualizationRouteRoute,
137+
ReconnectRouteRoute: ReconnectRouteRoute,
138+
TelemetryRouteRoute: TelemetryRouteRoute,
139+
};
140+
export const routeTree = rootRouteImport
141+
._addFileChildren(rootRouteChildren)
142+
._addFileTypes<FileRouteTypes>();

apps/dev-playground/client/src/routes/__root.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ function RootComponent() {
4848
Reconnect
4949
</Button>
5050
</Link>
51+
<Link to="/telemetry" className="no-underline">
52+
<Button
53+
variant="ghost"
54+
className="text-gray-700 hover:text-gray-900"
55+
>
56+
Telemetry
57+
</Button>
58+
</Link>
5159
</div>
5260
</nav>
5361
</div>

apps/dev-playground/client/src/routes/index.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,24 @@ function IndexRoute() {
8585
</Button>
8686
</div>
8787
</Card>
88+
89+
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
90+
<div className="flex flex-col h-full">
91+
<h3 className="text-2xl font-semibold text-gray-900 mb-3">
92+
Telemetry
93+
</h3>
94+
<p className="text-gray-600 mb-6 flex-grow">
95+
Explore OpenTelemetry-compatible tracing and metrics examples
96+
with interactive demos showcasing custom observability patterns.
97+
</p>
98+
<Button
99+
onClick={() => navigate({ to: "/telemetry" })}
100+
className="w-full"
101+
>
102+
Try Telemetry Examples
103+
</Button>
104+
</div>
105+
</Card>
88106
</div>
89107

90108
<div className="text-center pt-12 border-t border-gray-200">

0 commit comments

Comments
 (0)