File tree Expand file tree Collapse file tree 4 files changed +31
-1
lines changed Expand file tree Collapse file tree 4 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ export class Transaction extends SpanClass implements TransactionInterface {
4545 this . metadata = {
4646 ...transactionContext . metadata ,
4747 spanMetadata : { } ,
48+ nameChanges : [ ] ,
49+ propagations : 0 ,
4850 } ;
4951
5052 this . _trimEnd = transactionContext . trimEnd ;
@@ -156,6 +158,8 @@ export class Transaction extends SpanClass implements TransactionInterface {
156158 ...( metadata . source && {
157159 transaction_info : {
158160 source : metadata . source ,
161+ name_changes : metadata . nameChanges ,
162+ propagations : metadata . propagations ,
159163 } ,
160164 } ) ,
161165 } ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { CaptureContext } from './scope';
1111import { SdkInfo } from './sdkinfo' ;
1212import { Severity , SeverityLevel } from './severity' ;
1313import { Span } from './span' ;
14- import { TransactionSource } from './transaction' ;
14+ import { TransactionNameChange , TransactionSource } from './transaction' ;
1515import { User } from './user' ;
1616
1717/** JSDoc */
@@ -49,6 +49,8 @@ export interface Event {
4949 sdkProcessingMetadata ?: { [ key : string ] : any } ;
5050 transaction_info ?: {
5151 source : TransactionSource ;
52+ name_changes : TransactionNameChange [ ] ;
53+ propagations : number ;
5254 } ;
5355}
5456
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ export type {
7373 TransactionMetadata ,
7474 TransactionSamplingMethod ,
7575 TransactionSource ,
76+ TransactionNameChange ,
7677} from './transaction' ;
7778export type {
7879 DurationUnit ,
Original file line number Diff line number Diff line change @@ -150,6 +150,12 @@ export interface TransactionMetadata {
150150
151151 /** Metadata for the transaction's spans, keyed by spanId */
152152 spanMetadata : { [ spanId : string ] : { [ key : string ] : unknown } } ;
153+
154+ /** Metadata representing information about transaction name changes */
155+ nameChanges : TransactionNameChange [ ] ;
156+
157+ /** The total number of propagations that happened */
158+ propagations : number ;
153159}
154160
155161/**
@@ -169,3 +175,20 @@ export type TransactionSource =
169175 | 'component'
170176 /** Name of a background task (e.g. a Celery task) */
171177 | 'task' ;
178+
179+ /**
180+ * Object representing metadata about when a transaction name was changed.
181+ */
182+ export interface TransactionNameChange {
183+ /**
184+ * Unix timestamp when the name was changed. Same type as the start and
185+ * end timestamps of a transaction and span.
186+ */
187+ timestamp : number ;
188+
189+ /** New source applied for transaction name change */
190+ source : TransactionSource ;
191+
192+ /** Number of propagations since start of transaction */
193+ propagations : number ;
194+ }
You can’t perform that action at this time.
0 commit comments