File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
1010 <!-- Aspire: point browser OTLP exporter to API proxy to avoid CORS -->
1111 < meta name ="otlp-endpoint " content ="http://localhost:5179/otlp/v1/traces ">
12+ <!-- Disable CDN imports for OpenTelemetry; use local shim -->
13+ < meta name ="otel-cdn " content ="off ">
1214 <!-- Local Conduit CSS to avoid CORS errors -->
1315 < link rel ="stylesheet " href ="css/main.css " />
1416 < link href ="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css " rel ="stylesheet " type ="text/css " crossorigin ="anonymous ">
Original file line number Diff line number Diff line change @@ -17,6 +17,17 @@ let SpanStatusCode = { OK: 1, ERROR: 2 };
1717void ( async ( ) => {
1818 try {
1919 const otelInit = ( async ( ) => {
20+ // Allow disabling CDN-based OTel via flag or meta tag
21+ const useCdn = ( ( ) => {
22+ try {
23+ if ( window . __OTEL_USE_CDN === false ) return false ;
24+ const m = document . querySelector ( 'meta[name="otel-cdn"]' ) ;
25+ const v = ( m && m . getAttribute ( 'content' ) ) || '' ;
26+ if ( v && v . toLowerCase ( ) === 'off' ) return false ;
27+ } catch { }
28+ return true ;
29+ } ) ( ) ;
30+ if ( ! useCdn ) throw new Error ( 'OTel CDN disabled' ) ;
2031 // Try to load the OTel API first; if it fails, keep using no-op
2132 let api ;
2233 try {
You can’t perform that action at this time.
0 commit comments