Skip to content

Commit ec12605

Browse files
committed
New builtin hook method, add operationKind
1 parent 680c3bb commit ec12605

21 files changed

+340
-338
lines changed

instrumentation-wasm/src/js_transformer/helpers/insert_code.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@ pub fn insert_single_statement_into_func<'a>(
2222
pub fn insert_inspect_args<'a>(
2323
allocator: &'a Allocator,
2424
identifier: &str,
25-
pkg_name: &'a str,
2625
pkg_version: &'a str,
27-
instruction_name: &str,
2826
body: &mut Box<'a, FunctionBody<'a>>,
2927
) {
3028
let source_text: &'a str = allocator.alloc_str(&format!(
31-
"__instrumentInspectArgs('{}', arguments, '{}', '{}', '{}', this);",
32-
identifier, pkg_name, pkg_version, instruction_name
29+
"__instrumentInspectArgs('{}', arguments, '{}', this);",
30+
identifier, pkg_version
3331
));
3432

3533
insert_single_statement_into_func(allocator, body, 0, source_text);

instrumentation-wasm/src/js_transformer/transformer.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use super::{
1616
};
1717

1818
pub fn transform_code_str(
19-
pkg_name: &str,
19+
_pkg_name: &str,
2020
pkg_version: &str,
2121
code: &str,
2222
instructions_json: &str,
@@ -49,7 +49,6 @@ pub fn transform_code_str(
4949
let t = &mut Transformer {
5050
allocator: &allocator,
5151
file_instructions: &file_instructions,
52-
pkg_name: &pkg_name,
5352
pkg_version: &pkg_version,
5453
};
5554

instrumentation-wasm/src/js_transformer/transformer_impl.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use super::instructions::FileInstructions;
1313
pub struct Transformer<'a> {
1414
pub allocator: &'a Allocator,
1515
pub file_instructions: &'a FileInstructions,
16-
pub pkg_name: &'a str,
1716
pub pkg_version: &'a str,
1817
}
1918

@@ -70,9 +69,7 @@ impl<'a> Traverse<'a> for Transformer<'a> {
7069
insert_inspect_args(
7170
self.allocator,
7271
&instruction.identifier,
73-
self.pkg_name,
7472
self.pkg_version,
75-
&instruction.name,
7673
body,
7774
);
7875
}
@@ -146,9 +143,7 @@ impl<'a> Traverse<'a> for Transformer<'a> {
146143
insert_inspect_args(
147144
self.allocator,
148145
&instruction.identifier,
149-
self.pkg_name,
150146
self.pkg_version,
151-
&instruction.name,
152147
body,
153148
);
154149
}

library/agent/hooks/instrumentation/builtinShim.test.ts

Lines changed: 0 additions & 75 deletions
This file was deleted.

library/agent/hooks/instrumentation/builtinShim.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)