Skip to content

Commit a937852

Browse files
Merge branch 'egou/v7/feat/create-interaction-spans-on-inp' of github.com:getsentry/sentry-javascript into egou/v7/feat/add-sampling-rate-to-inp-spans
2 parents c2aa318 + 690ecc1 commit a937852

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/core/src/span.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { SpanEnvelope, SpanItem } from '@sentry/types';
2-
import type { Span } from '@sentry/types/build/types/span';
2+
import type { Span } from '@sentry/types';
33
import { createEnvelope } from '@sentry/utils';
44

55
/**

packages/tracing-internal/src/browser/metrics/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ function _trackINP(interactionIdtoRouteNameMapping: InteractionRouteNameMapping)
230230
release: options.release,
231231
environment: options.environment,
232232
transaction: routeName,
233+
exclusive_time: metric.value,
233234
},
234-
exclusiveTime: metric.value,
235235
});
236236

237237
/** Check to see if the span should be sampled */
@@ -241,7 +241,7 @@ function _trackINP(interactionIdtoRouteNameMapping: InteractionRouteNameMapping)
241241
}
242242

243243
if (Math.random() < (sampleRate as number | boolean)) {
244-
const envelope = span ? createSpanEnvelope(span) : undefined;
244+
const envelope = span ? createSpanEnvelope([span]) : undefined;
245245
const transport = client && client.getTransport();
246246
if (transport && envelope) {
247247
transport.send(envelope).then(null, reason => {

0 commit comments

Comments
 (0)