Initial usage telemetry

This commit is contained in:
Karl Seguin
2025-02-25 12:40:01 +08:00
parent 671dbcfd55
commit 56ddcc8e29
5 changed files with 258 additions and 1 deletions

23
src/app.zig Normal file
View File

@@ -0,0 +1,23 @@
const std = @import("std");
const Allocator = std.mem.Allocator;
const Telemetry = @import("telemetry/telemetry.zig").Telemetry;
// Container for global state / objects that various parts of the system
// might need.
pub const App = struct {
telemetry: Telemetry,
pub fn init(allocator: Allocator) !App {
const telemetry = Telemetry.init(allocator);
errdefer telemetry.deinit();
return .{
.telemetry = telemetry,
};
}
pub fn deinit(self: *App) void {
self.telemetry.deinit();
}
};