Add an option to add host resources automatically #68
I thought they had removed solaris support from 0.17.0-dev onwards, due to how difficult it was to maintain a valid linker for it?
Definitely remember the discussion, but if it's gone after 0.16.0, compiler will tell 😄
Why even bothering converting these and not awlasy use@tagName(builtin.cpu.arch)?
Arewe trying to mirror the Go/Rust SDK names or adhere to a specific convention?
nit: can we have a unit test for this?
Or actually, since we're parsing the key/value form also for other env vars (see #78), can we factor out a common function that makes the parsing and returns a slice of tuple { key: []const u8, val: []const u8 }?
What do you think of hvaing this field as optional, and initialized to null?
It would make all changes to constructors in resource.zig unneeded, and would not break compilation for existing users of the Configuration struct.
I feel like the fact that the feature is experimental supports the suggestion, let me know.
Nice work, thanks for the proposal Antoine 🙏🏼
Left a couple of comments
Yes they removed solaris, which is not open-source, but kept illumos, which is open-source.
Quote from 0.16 release notes:
Support for Oracle's Solaris and IBM's AIX and z/OS has been removed. In general, the Zig project cannot support proprietary operating systems that make it unreasonably difficult to obtain system headers and thus audit contributions. Note that this does not affect illumos; being an open source fork from OpenSolaris, it remains supported.
OTel semantic convention specs:
host.arch has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
Agreed, let's make an iterator for this
I realized that these should be enabled by default:
1. Those attributes are marked as:
- os.type: "Required"
- host.arch: "Recommended"
- process.runtime.: "Recommended"
- telemetry.sdk.: "Required"
1. "Required" and "Recommended" means enabled by default
So I will make these opt-out rather than opt-in.
Python SDK added the possibility to include all detectors with * (PR)
great, do we provide in semconv an enum of host.arch known values to pull tag from? I'd love to see it referenced here.
I saw the raw values written by hand and got confused, if they were referencing the enum from semconv, we are safer.
WDYT?
Got it, thanks 🙏🏼
So we're init'ing the new field in the constructor?
Nvm, I saw the code once more...
After https://github.com/open-telemetry/opentelemetry-zig/pull/92 is merged I will use the iterator here
inge4pres
agagniere
Added unconditionally: SDK name, version & language
Added conditionally with 3 selectable categories:
- host: arch
- os: os type
- process: runtime name & version
For now only comptime-known values are added, the remaining work for runtime detection is tracked in #17
(Moved from https://github.com/zig-o11y/opentelemetry-sdk/pull/159)