Skip to content

Commit

Permalink
Disable low-value client-side instrumentaton
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye authored and hahn-kev committed Feb 8, 2024
1 parent 033dd89 commit 68613aa
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions frontend/src/lib/otel/otel.client.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { BatchSpanProcessor, WebTracerProvider } from '@opentelemetry/sdk-trace-web'
import {SERVICE_NAME, traceUserAttributes} from '.';

import { APP_VERSION } from '$lib/util/version';
import { OTLPTraceExporterBrowserWithXhrRetry } from './trace-exporter-browser-with-xhr-retry';
import { Resource } from '@opentelemetry/resources'
import {SERVICE_NAME, traceUserAttributes} from '.';
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'
import { ZoneContextManager } from '@opentelemetry/context-zone'
import { getWebAutoInstrumentations } from '@opentelemetry/auto-instrumentations-web'
Expand All @@ -14,7 +14,15 @@ export * from '.';

instrumentGlobalFetch(() => {
registerInstrumentations({
instrumentations: [getWebAutoInstrumentations()],
instrumentations: [getWebAutoInstrumentations({
'@opentelemetry/instrumentation-document-load': {
// note: disabling this makes the traceParent in our root layout meaningless
enabled: false,
},
'@opentelemetry/instrumentation-user-interaction': {
enabled: false,
},
})],
});
});

Expand Down

0 comments on commit 68613aa

Please sign in to comment.