logfire client for zig
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix readLinkAbsolute for zig 0.16

std.fs.readLinkAbsolute → std.Io.Dir.readLinkAbsolute(io, path, buf)
which returns usize instead of []const u8.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+3 -1
+3 -1
src/otel_wrapper.zig
··· 16 16 //! logfire.counter("requests.total", 1); 17 17 18 18 const std = @import("std"); 19 + const io = std.Options.debug_io; 19 20 const otel = @import("otel"); 20 21 const otel_api = otel.api; 21 22 const otel_sdk = otel.sdk; ··· 459 460 .linux => { 460 461 // read /proc/self/exe symlink 461 462 var buf: [std.fs.max_path_bytes]u8 = undefined; 462 - if (std.fs.readLinkAbsolute("/proc/self/exe", &buf)) |path| { 463 + if (std.Io.Dir.readLinkAbsolute(io, "/proc/self/exe", &buf)) |len| { 464 + const path = buf[0..len]; 463 465 const basename = std.fs.path.basename(path); 464 466 const owned_path = try allocator.dupe(u8, path); 465 467 const owned_basename = try allocator.dupe(u8, basename);