Skip to content

Commit 759c614

Browse files
simon-idtimfish
authored andcommitted
fix: change rewritten function nametraced to __apm$traced #21
1 parent f5d7d1f commit 759c614

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/instrumentation.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ impl Instrumentation {
115115
));
116116

117117
body.stmts = vec![
118-
quote!("const traced = $traced;" as Stmt, traced: Expr = traced_fn.into()),
118+
quote!("const __apm$traced = $traced;" as Stmt, traced: Expr = traced_fn.into()),
119119
quote!(
120-
"if (!$ch.hasSubscribers) return traced();" as Stmt,
120+
"if (!$ch.hasSubscribers) return __apm$traced();" as Stmt,
121121
ch = ch_ident
122122
),
123123
quote!(
124-
"return $trace(traced, { arguments, self: this } );" as Stmt,
124+
"return $trace(__apm$traced, { arguments, self: this } );" as Stmt,
125125
trace = trace_ident
126126
),
127127
];

0 commit comments

Comments
 (0)