Skip to content

Commit

Permalink
streamline types
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Oct 19, 2023
1 parent cd0a0cd commit 94f3641
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
18 changes: 1 addition & 17 deletions packages/tracing-internal/src/browser/instrument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,7 @@ function instrument(type: InstrumentHandlerType): void {
}

export function addPerformanceInstrumentationHandler(
type: 'event',
callback: (data: { entries: PerformanceEventTiming[] }) => void,
): CleanupHandlerCallback;
export function addPerformanceInstrumentationHandler(
type: 'navigation',
callback: (data: { entries: PerformanceNavigationTiming[] }) => void,
): CleanupHandlerCallback;
export function addPerformanceInstrumentationHandler(
type: 'paint',
callback: (data: { entries: PerformancePaintTiming[] }) => void,
): CleanupHandlerCallback;
export function addPerformanceInstrumentationHandler(
type: 'resource',
callback: (data: { entries: PerformanceResourceTiming[] }) => void,
): CleanupHandlerCallback;
export function addPerformanceInstrumentationHandler(
type: 'longtask' | 'element' | InstrumentHandlerTypePerformanceObserver,
type: InstrumentHandlerTypePerformanceObserver,
callback: (data: { entries: PerformanceEntry[] }) => void,
): CleanupHandlerCallback;
export function addPerformanceInstrumentationHandler(
Expand Down
2 changes: 1 addition & 1 deletion packages/tracing-internal/src/browser/metrics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export function startTrackingInteractions(): void {
const duration = msToSec(entry.duration);

transaction.startChild({
description: htmlTreeAsString(entry.target),
description: htmlTreeAsString((entry as PerformanceEventTiming).target),
op: `ui.interaction.${entry.name}`,
origin: 'auto.ui.browser.metrics',
startTimestamp: startTime,
Expand Down

0 comments on commit 94f3641

Please sign in to comment.