You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*@param {string} traceId if present, it will use this to assign traceId of transaction. only used in otel bridge mode to ensure trace id is same as otel spans
74
74
* @fires Agent#transactionStarted
75
75
*/
76
-
functionTransaction(agent){
76
+
functionTransaction(agent,traceId){
77
77
if(!agent){
78
78
thrownewError('every transaction must be bound to the agent')
79
79
}
@@ -131,7 +131,7 @@ function Transaction(agent) {
131
131
this.parentAcct=null
132
132
this.parentTransportType=null
133
133
this.parentTransportDuration=null
134
-
this._traceId=null
134
+
this._traceId=traceId||null
135
135
Object.defineProperty(this,'traceId',{
136
136
get(){
137
137
if(this._traceId===null){
@@ -949,9 +949,10 @@ function acceptDistributedTraceHeaders(transportType, headers) {
949
949
* Inserts distributed trace headers into the provided headers map.
0 commit comments