Skip to content

Commit 0088d53

Browse files
committed
feat: support new event kinds: bump only minor version, as we have other 0.7+
1 parent aa37e95 commit 0088d53

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "runtime_tracing"
3-
version = "0.6.0"
3+
version = "0.6.1"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

src/tracer.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ impl Tracer {
119119

120120
pub fn register_step(&mut self, path: &Path, line: Line) {
121121
let path_id = self.ensure_path_id(path);
122-
self.events.push(TraceLowLevelEvent::Step(StepRecord { path_id, line}));
122+
self.events.push(TraceLowLevelEvent::Step(StepRecord { path_id, line }));
123123
}
124124

125125
pub fn register_call(&mut self, function_id: FunctionId, args: Vec<FullValueRecord>) {
@@ -149,9 +149,11 @@ impl Tracer {
149149
self.events.push(TraceLowLevelEvent::Return(ReturnRecord { return_value }));
150150
}
151151

152+
// TODO: add metadata arg
152153
pub fn register_special_event(&mut self, kind: EventLogKind, content: &str) {
153154
self.events.push(TraceLowLevelEvent::Event(RecordEvent {
154155
kind,
156+
metadata: "".to_string(),
155157
content: content.to_string(),
156158
}));
157159
}

src/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ pub enum TypeSpecificInfo {
250250
#[derive(Debug, Clone, Serialize, Deserialize)]
251251
pub struct RecordEvent {
252252
pub kind: EventLogKind,
253+
pub metadata: String,
253254
pub content: String,
254255
}
255256

@@ -374,8 +375,10 @@ pub enum EventLogKind {
374375
#[default]
375376
Write,
376377
WriteFile,
378+
WriteOther,
377379
Read,
378380
ReadFile,
381+
ReadOther,
379382
// not used for now
380383
ReadDir,
381384
OpenDir,

0 commit comments

Comments
 (0)