Skip to content

Conversation

thompson-tomo
Copy link
Contributor

@thompson-tomo thompson-tomo commented Aug 15, 2025

Progresses #1257

Changes

Adds in itron as a os type. Itron is defined as an os by rust hence the rust resource detector will be reporting this value: https://doc.rust-lang.org/std/env/consts/constant.FAMILY.html

Note: if the PR is touching an area that is not listed in the existing areas, or the area does not have sufficient domain experts coverage, the PR might be tagged as experts needed and move slowly until experts are identified.

Merge requirement checklist

  • CONTRIBUTING.md guidelines followed.
  • Change log entry added, according to the guidelines in When to add a changelog entry.
    • If your PR does not need a change log, start the PR title with [chore]
  • Links to the prototypes or existing instrumentations (when adding or changing conventions)

@thompson-tomo thompson-tomo requested review from a team as code owners August 15, 2025 02:38
@github-actions github-actions bot added enhancement New feature or request area:os labels Aug 15, 2025
@thompson-tomo thompson-tomo changed the title Add in Itron Add in Itron as OS type Aug 15, 2025
@jsuereth
Copy link
Contributor

@cijothomas Would you mind weighing in on this from the rust side? Is this an os.type you already report?

@cijothomas
Copy link
Member

@cijothomas Would you mind weighing in on this from the rust side? Is this an os.type you already report?

We have a detector that sets the os.type attribute here, but the possible values are from this list: https://doc.rust-lang.org/std/env/consts/constant.OS.html

There is another std const (https://doc.rust-lang.org/std/env/consts/constant.FAMILY.html) for OS Family, that does have "itron". Maybe the detector should use OSFamily for os.type..?

@gruebel Do you have any thoughts on this?

@lalitb
Copy link
Member

lalitb commented Aug 18, 2025

Maybe the detector should use OSFamily for os.type..?

OS.Family seems to be broader bucket, won't cover all the OS types from specs (e.g. both linux and macOS/darwin are treated as UNIX by OS.Family). I believe we can have combination of both OS.Family and OS.Type. something like:

use std::env::consts::{OS, FAMILY};

let os_type = match FAMILY {
    // special handling for wasm and itron
    "wasm" => "wasm",
    "itron" => "itron",
    // everything else: keep using the specific OS string
    _ => OS,
};

@lalitb
Copy link
Member

lalitb commented Aug 18, 2025

but going through the comment - #2635 (review)

I think the Itron also falls in same reasoning. From the wiki - this is a specification which can be used to develop RTOS, and so not a specific OS type.

@thompson-tomo
Copy link
Contributor Author

thompson-tomo commented Aug 19, 2025

I agree os.family is a broader bucket which is actually what we are after. Note with #2423 the refocusing of that attribute will be done which will result in options of Unix & windows nt. Afterwards https://doc.rust-lang.org/std/env/consts/constant.OS.html would be used as the name which most of that list appears to be ie watchos.

In terms of Linux vs darwin that would actually be addressed via #2461

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:os enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

4 participants