-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(node)!: Collect request sessions via HTTP instrumentation #14658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 45 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
7846b24
ci(v9): Ensure CI runs on v8 & v9 branches (#14604)
mydea d1ee444
feat(vue/nuxt)!: No longer create `"update"` spans for component trac…
26119bf
feat(nextjs)!: Remove `experimental_captureRequestError` (#14607)
d7e3626
feat(node)!: Collect request sessions via HTTP instrumentation
30e2329
Merge branch 'v9' into lforst-server-sessions
5430723
depr notice
6610144
ci(v9): Ensure CI runs on v8 & v9 branches (#14604)
mydea 1648698
feat(vue/nuxt)!: No longer create `"update"` spans for component trac…
d9ee102
feat(nextjs)!: Remove `experimental_captureRequestError` (#14607)
32a1cff
meta(v9): Add v9 migration guide (#14296)
3add6cd
feat(node)!: Remove `processThreadBreadcrumbIntegration` (#14666)
8b81476
feat(node)!: Avoid http spans by default for custom OTEL setups (#14678)
mydea c0f9aaa
Merge remote-tracking branch 'origin/v9' into lforst-server-sessions
1c9544b
ref!: Don't polyfill optional chaining and nullish coalescing (#14603)
b2aed90
Merge branch 'v9' into lforst-server-sessions
ac0d55a
revert
74ac9c3
Hmm
5e65c87
ci(v9): Ensure CI runs on v8 & v9 branches (#14604)
mydea fac8d97
feat(vue/nuxt)!: No longer create `"update"` spans for component trac…
6772615
feat(nextjs)!: Remove `experimental_captureRequestError` (#14607)
6e88c55
meta(v9): Add v9 migration guide (#14296)
bfd865c
feat(node)!: Remove `processThreadBreadcrumbIntegration` (#14666)
550ceef
feat(node)!: Avoid http spans by default for custom OTEL setups (#14678)
mydea f792e64
ref!: Don't polyfill optional chaining and nullish coalescing (#14603)
5c7d64e
Merge branch 'v9' into lforst-server-sessions
a2ca9b0
crashed and errored
64ab7f6
rm unneeded tests
0d38856
More cleanup
974b37b
stuff
c3b7e24
formatting
7800715
Merge remote-tracking branch 'origin/develop' into lforst-server-sess…
cde5a08
Fix some tests
eb795ec
hm
31686ac
desperately try to improve bundle size
2d084e8
bundle?
a0fe31d
Merge branch 'develop' into lforst-server-sessions
084781a
fun
cae7fc8
Add the most beautiful tests I have ever produced
3cfd11b
Merge branch 'develop' into lforst-server-sessions
ad59b24
fix
d06262c
Merge branch 'develop' into lforst-server-sessions
0c7f97c
lint
5940711
Merge remote-tracking branch 'origin/develop' into lforst-server-sess…
845e454
fix
d93c352
facepalm
aabd1a9
Merge remote-tracking branch 'origin/develop' into lforst-server-sess…
9ab3627
Feedback
120c34e
messed up merge
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 6 additions & 9 deletions
15
dev-packages/node-integration-tests/suites/sessions/server.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,23 @@ | ||
import { loggingTransport } from '@sentry-internal/node-integration-tests'; | ||
import type { SessionFlusher } from '@sentry/core'; | ||
import * as Sentry from '@sentry/node'; | ||
|
||
Sentry.init({ | ||
dsn: 'https://[email protected]/1337', | ||
release: '1.0', | ||
transport: loggingTransport, | ||
integrations: [ | ||
Sentry.httpIntegration({ | ||
// Flush after 2 seconds (to avoid waiting for the default 60s) | ||
sessionFlushingDelayMS: 2_000, | ||
}), | ||
], | ||
}); | ||
|
||
import { startExpressServerAndSendPortToRunner } from '@sentry-internal/node-integration-tests'; | ||
import express from 'express'; | ||
|
||
const app = express(); | ||
|
||
// eslint-disable-next-line deprecation/deprecation | ||
const flusher = (Sentry.getClient() as Sentry.NodeClient)['_sessionFlusher'] as SessionFlusher; | ||
|
||
// Flush after 2 seconds (to avoid waiting for the default 60s) | ||
setTimeout(() => { | ||
flusher?.flush(); | ||
}, 2000); | ||
|
||
app.get('/test/success', (_req, res) => { | ||
res.send('Success!'); | ||
}); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.