Skip to content

Proposal: Add host resources automatically#159

Open
agagniere wants to merge 2 commits into
zig-o11y:mainfrom
agagniere:proposal/host-ressources
Open

Proposal: Add host resources automatically#159
agagniere wants to merge 2 commits into
zig-o11y:mainfrom
agagniere:proposal/host-ressources

Conversation

@agagniere

Copy link
Copy Markdown
Contributor

TL;DR:

    .{ .key = "telemetry.sdk.name", .value = .{ .string = build_info.name } }, // package name: "opentelemetry"
    .{ .key = "telemetry.sdk.language", .value = .{ .string = "zig" } },
    .{ .key = "telemetry.sdk.version", .value = .{ .string = build_info.version } }, // package version, currently "0.0.1"
    .{ .key = "os.type", .value = .{ .string = os_type } }, // from builtin.os.tag
    .{ .key = "host.arch", .value = .{ .string = host_arch } }, // from builtin.cpu.arch
    .{ .key = "process.runtime.name", .value = .{ .string = "zig" } },
    .{ .key = "process.runtime.version", .value = .{ .string = builtin.zig_version_string } },

@inge4pres inge4pres changed the title Proposal: Add host ressources automatically Proposal: Add host resources automatically May 11, 2026

@inge4pres inge4pres left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very good idea! thanks for adding this 🙏🏼
There are cases in which users may not want to add the same attributes to all providers, can we have a flag to opt-in into this behavior?
Attributes and their (mis)usage is probably the most controversial and delicate topic in OpenTelemetry, so letting users decide on how to enable this behavior seems the most sensible approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants