-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(tracing): Add hook for trace sampling function to SDK options #2820
Changes from all commits
df7181a
fa72ceb
290604d
05a358e
90854cc
cbc216c
85a0776
4f1b484
382320f
3587b64
a7a48b5
3855006
2a1d731
551afc4
1453092
17512a0
8252e36
c3e4b60
4582354
c9d77ec
e784f4b
669428c
6fb10c3
2853c8f
36b8b4f
101f9d0
85deeb6
64fde64
573fe73
b98bded
9c6f0cb
fd4d48c
7b47a06
be6abc8
69e49e3
cbaecb3
ccba78a
d6fd44a
0710860
8572b08
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
export { Carrier, Layer } from './interfaces'; | ||
export { Carrier, DomainAsCarrier, Layer } from './interfaces'; | ||
export { addGlobalEventProcessor, Scope } from './scope'; | ||
export { getCurrentHub, getHubFromCarrier, getMainCarrier, Hub, makeMain, setHubOnCarrier } from './hub'; | ||
export { | ||
getActiveDomain, | ||
getCurrentHub, | ||
getHubFromCarrier, | ||
getMainCarrier, | ||
Hub, | ||
makeMain, | ||
setHubOnCarrier, | ||
} from './hub'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { Client } from '@sentry/types'; | ||
import * as domain from 'domain'; | ||
|
||
import { Hub } from './hub'; | ||
import { Scope } from './scope'; | ||
|
@@ -20,9 +21,23 @@ export interface Carrier { | |
__SENTRY__?: { | ||
hub?: Hub; | ||
/** | ||
* These are extension methods for the hub, the current instance of the hub will be bound to it | ||
* Extra Hub properties injected by various SDKs | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
extensions?: { [key: string]: Function }; | ||
extensions?: { | ||
/** Hack to prevent bundlers from breaking our usage of the domain package in the cross-platform Hub package */ | ||
domain?: typeof domain & { | ||
/** | ||
* The currently active domain. This is part of the domain package, but for some reason not declared in the | ||
* package's typedef. | ||
*/ | ||
active?: domain.Domain; | ||
}; | ||
} & { | ||
/** Extension methods for the hub, which are bound to the current Hub instance */ | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
[key: string]: Function; | ||
}; | ||
Comment on lines
+26
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. H: Are we sure that doesn't break in Browser environments? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will check again, for sure, but the change here isn't a behavior change but merely a TS one. We've always put the domain there, it's just that before we didn't include it in the type so we had to do a lot of Anyway, will check and update here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. UPDATE: Seems to build just fine, with no special accommodation in my set up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lobsterkatie It seems like these changes broke There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #3050 for a fix. |
||
}; | ||
} | ||
|
||
export interface DomainAsCarrier extends domain.Domain, Carrier {} |
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.
We shouldn't be using
@types/node
in an isomorphic package.