File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { Span as SpanInterface, SpanContext } from '@sentry/types';
3
3
import { dropUndefinedKeys , timestampWithMs , uuid4 } from '@sentry/utils' ;
4
4
5
5
import { SpanStatus } from './spanstatus' ;
6
+ import { Transaction } from './transaction' ;
6
7
7
8
/**
8
9
* Keeps track of finished spans for a given transaction
@@ -99,6 +100,11 @@ export class Span implements SpanInterface, SpanContext {
99
100
*/
100
101
public spanRecorder ?: SpanRecorder ;
101
102
103
+ /**
104
+ * @inheritDoc
105
+ */
106
+ public transaction ?: Transaction ;
107
+
102
108
/**
103
109
* You should never call the constructor manually, always use `hub.startSpan()`.
104
110
* @internal
Original file line number Diff line number Diff line change
1
+ import { Transaction } from './transaction' ;
2
+
1
3
/** Interface holding all properties that can be set on a Span on creation. */
2
4
export interface SpanContext {
3
5
/**
@@ -84,6 +86,11 @@ export interface Span extends SpanContext {
84
86
*/
85
87
data : { [ key : string ] : any } ;
86
88
89
+ /**
90
+ * The transaction containing this span
91
+ */
92
+ transaction ?: Transaction ;
93
+
87
94
/**
88
95
* Sets the finish timestamp on the current span.
89
96
* @param endTimestamp Takes an endTimestamp if the end should not be the time when you call this function.
You can’t perform that action at this time.
0 commit comments