Skip to content

Commit 462ed1a

Browse files
committed
comment
1 parent d648afa commit 462ed1a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎dev-packages/e2e-tests/test-applications/nextjs-16-streaming-cacheComponents/tests/useCacheSpans.spec.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { collectStreamedSpans, getSpanOp } from '@sentry-internal/test-utils';
33
import { findCacheSpan } from './cacheOriginLinks-utils';
44

55
test('uses low-cardinality names for `use cache` spans', async ({ request }) => {
6-
// A fresh id makes the request a guaranteed cache miss, so the trace contains both a `cache.get` and a `cache.put` span.
6+
// A fresh id makes the request a guaranteed cache miss (the id is part of the cache key), so the
7+
// trace contains both a `cache.get` and a `cache.put` span.
78
const id = crypto.randomUUID();
89

910
const spansPromise = collectStreamedSpans('nextjs-16-streaming-cacheComponents', spansOfTrace => {
@@ -17,7 +18,8 @@ test('uses low-cardinality names for `use cache` spans', async ({ request }) =>
1718
await request.get(`/api/use-cache?id=${id}`);
1819
const spans = await spansPromise;
1920

20-
// With span streaming the span name is the low-cardinality op
21+
// With span streaming the span name is the low-cardinality op; the key digest stays on
22+
// `cache.key`, where Relay reads the span description from.
2123
const getSpan = findCacheSpan(spans, 'cache.get');
2224
expect(getSpan).toBeDefined();
2325
expect(getSpan!.name).toBe('cache.get');

0 commit comments

Comments
 (0)