Uh oh!
There was an error while loading. Please reload this page.
feat(tracing): Add transaction source field - #5367
Conversation
This patch adds `source` information to `Transaction`, which is typed by `TransactionSource` in `@sentry/tracing`. This helps track how the name of a transaction was determined, which will be used by the server for server-side controls. For now, we are placing the `source` field under transaction metadata. In the future, we can move this up into a top level API (an argument to `startTransaction` or `transaction.setSource`) if needed, but this should be fine to get us started. For next steps, after this patch gets merged, we will start going through various routing instrumentation frameworks and adding transaction source.
size-limit report 📦
|
Lms24
left a comment
There was a problem hiding this comment.
LGTM overall. Had some questions.
One more question: We're using setMetadata for the time being to not expose Transaction.setSource as public API, correct?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
AbhiPrasad
commented
Jul 6, 2022
Yes exactly! We can come back and change this later if needed. |
Lms24
commented
Jul 6, 2022
Thanks for clarifying, makes sense to me! |
FWIW, we don't need to do this, I don't think, because we can just do |
… an unparameterized URL (#5392) This patch re-introduces the `transaction` field in the Dynamic Sampling Context (DSC). However, its presence is now determined by the [transaction source](https://develop.sentry.dev/sdk/event-payloads/transaction/#transaction-annotations) which was introduced in #5367. As of this we we add the `transaction` field back, if the source indicates that the transaction name is not an unparameterized URL (meaning, the source is set and it is not `url`). Additionally, the PR (once again) adjusts our unit and integration tests to reflect this change. Repurposed some DSC<=>`sendDefaultPii` tests that we previously skipped to now cover the transaction<=>transaction source dependence. Did some cleanup of commented out old code and explanations that no longer apply. Remove he `'unknown'` field from the `TransactionSource` type because it is only used by Relay and SDKs shouldn't set it.
Ref: #5345
This patch adds
sourceinformation toTransaction, which is typed byTransactionSourcein@sentry/tracing. This helps track how the name of a transaction was determined, which will be used by the server forserver-side controls.
For now, we are placing the
sourcefield under transaction metadata. In the future, we can move this up into a top level API (an argument tostartTransactionortransaction.setSource) if needed, but this should be fine to get us started.For next steps, after this patch gets merged, we will start going through various routing instrumentation frameworks and adding transaction source.