fix incorrect sampled type on Transaction#11115
fix incorrect sampled type on Transaction#11115Lms24 merged 2 commits intogetsentry:developfrom quisido:patch-1
sampled type on Transaction#11115Conversation
|
Hey @quisido thanks for opening this PR! Which version are you experiencing this problem on? Generally, we're going to remove |
Sorry, yes, v7. |
Lms24
left a comment
There was a problem hiding this comment.
I see, thx for pointing out that this is still a problem in v8 (at least at the moment). I missed that Transaction now inherits ultimately also from SpanContext where we defined the explicit undefined.
As I said, medium-term, we'll remove Transaction so this won't be an issue anymore but for now, let's ensure we fix this. Thanks!
…11115) `@sentry/types` does not align with `@sentry/core`, and it causes build errors when `exactOptionalPropertyTypes` is `true`. This patch fixes the TypeScript error by explicitly adding `undefined` to the `sampled` flag of `Transaction`.
Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint) & (yarn test).@sentry/typesdoes not align with@sentry/core, and it causes build errors whenexactOptionalPropertyTypesistrue.Example error below:
This change fixes this.