feat(core): Extract sampleTransaction method out#9136
Conversation
size-limit report 📦
|
lforst
left a comment
There was a problem hiding this comment.
I don't wanna hard block this but is there any chance we can vendor this into the otel SDK? Right now this change just increases API surface and exposes an implementation detail without any real upside to the user.
I get what you mean, I was also not 100% sure. IMHO it is not super trivial code, we can of course copy this into node-experimental but since the trajectory for this is rather that we prob. want to expand on the POTEL stuff, I feel eventually we do not want to duplicate this as they should behave the same in both scenarios, we don't want them to drift apart 🤔 Personally, I would argue that the API that is exported from |
There was a problem hiding this comment.
I would argue that the API that is exported from @sentry/core is really mostly designed to be used by us
That doesn't really matter. Anything that is publicly exposed is a pain to refactor from that point onwards. You can't remove it, change params, rename it, ... . @sentry/core needs to follow semver. Any third party SDK depends on it.
But as I said, I don't wanna hard block. I just wanted you to think about it so: rubber stamp.
This extracts the
sampleTransactionmethod out and exports this fromcoreso we can use it for POTEL (where we build transactions differently).This is needed for #9085.