Skip to content

Commit

Permalink
feat: disable sentry temporarily
Browse files Browse the repository at this point in the history
Since sentry requires TLS now, I'll have to wait until Zig v12 to
re-enable it. Bastards
  • Loading branch information
kiedtl committed Oct 31, 2023
1 parent 33f0825 commit 2e4aff6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,11 @@ fn readInput() !bool {
// serializer.deserializeWorld() catch |e| {
// err.bug("Deser failed ({})", .{e});
// };
alert.queueThreatResponse(.{ .Assault = .{
.waves = 3,
.target = state.player,
} });
// alert.queueThreatResponse(.{ .Assault = .{
// .waves = 3,
// .target = state.player,
// } });
@panic("nooooooooooooo");
},
.F8 => {
_ = janet.loadFile("scripts/particles.janet", state.gpa.allocator()) catch continue;
Expand Down Expand Up @@ -1331,7 +1332,8 @@ pub fn actualMain() anyerror!void {
state.sentry_disabled = true;
state.gpa.allocator().free(v);
} else |_| {
state.sentry_disabled = false;
// state.sentry_disabled = false;
state.sentry_disabled = true;
}

var scale: f32 = 1;
Expand Down
3 changes: 2 additions & 1 deletion src/sentry.zig
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const std = @import("std");
const builtin = @import("builtin");

// TODO: *don't* encode this in here
const DSN = "https://[email protected]/6550409";
const DSN = "http://[email protected]/6550409";
const DSN_HASH = "029cc3a31c3740d4a60e3747e48c4aa2";
const DSN_ID = 6550409;

Expand Down Expand Up @@ -280,6 +280,7 @@ pub fn recordError(
const symb_info = try module.getSymbolAtAddress(address);
defer symb_info.deinit();
frame.function = symb_info.symbol_name;
std.log.info("function: {s}", .{frame.function});
if (symb_info.line_info) |li| {
std.mem.copy(u8, &frame.filename, li.file_name);
frame.lineno = li.line;
Expand Down

0 comments on commit 2e4aff6

Please sign in to comment.