Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(tracing): Add hook for trace sampling function to SDK options#2820
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
df7181afa72ceb290604d05a358e90854cccbc216c85a07764f1b484382320f3587b64a7a48b538550062a1d731551afc4145309217512a08252e36c3e4b604582354c9d77ece784f4b669428c6fb10c32853c8f36b8b4f101f9d085deeb664fde64573fe73b98bded9c6f0cbfd4d48c7b47a06be6abc869e49e3cbaecb3ccba78ad6fd44a07108608572b08File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
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
Member 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? MemberAuthor 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. MemberAuthor 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 Contributor 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 {} | ||
Uh oh!
There was an error while loading. Please reload this page.
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/nodein an isomorphic package.