-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[semantic conventions] Rename os.type
value DRAGONFLYBSD
to DRAGONFLY
#1572
Conversation
The `os.type` values seem inspired by the GOOS list, except for the one for Dragonfly BSD, which differs from the GOOS list. Renaming the constant to DRAGONFLY makes complying with the spec on Go implementations easier, removing the need to have a special case for this operating system family.
Please mention this breaking change in |
@arminru Done! |
| `FREEBSD` | FreeBSD | | ||
| `NETBSD` | NetBSD | | ||
| `OPENBSD` | OpenBSD | | ||
| `DRAGONFLYBSD` | DragonFly BSD | | ||
| `DRAGONFLY` | DragonFly BSD | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current value is, however, consistent with the others that also end in BSD
.
Do you know of any comparable libraries/lists other than the GOOS one? I could imagine this is just a Go peculiarity rather than the other way round.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rust seems to also use dragonfly
for its env::consts::OS
constant, while ending the rest in BSD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Java, for example, the os.name
system property seems to return DragonFlyBSD
for Dragonfly BSD (reference).
Seems like there's no right nor wrong here, either set of implementations will have to deal with it accordingly then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that there is no right or wrong answer (I apologize if the tone of my PR made it sound like there was).
That being said I think the current spec makes things much easier in general for Go than other languages: the rest of values match the runtime.GOOS
one exactly while e.g. they differ for Rust (DARWIN
vs. macos
) and they need more work in Java (Java is more verbose and needs more elaborate handling of Windows and macOS). Given that this is the only thing stopping Go from not having special cases I think it would make sense to change it. It is also my impression that it's more likely that this kind of attributes get added at the Collector level (which is written in Go) than on the different instrumentation languages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, we chose https://github.com/open-telemetry/opentelemetry-specification/blob/main/semantic_conventions/resource/host.yaml#L24 independently from GOARCH. Not sure if we should optimize the enums for one language or the other. If we would like to be Go-friendly, we might want to address the host.arch enum values as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that there is no right or wrong answer (I apologize if the tone of my PR made it sound like there was).
No worries, I didn't have that impression. 🙂
It is also my impression that it's more likely that this kind of attributes get added at the Collector level (which is written in Go) than on the different instrumentation languages.
This makes sense if the collector is deployed in agent mode but not when used as gateway in standalone mode. If we define our goal to allow for easier Go support in these cases (not because we favor the Go SDK but because of the collector), I agree that we should do what @rakyll suggested.
That being said, I don't have an opinion here - either (the current value or what you suggested) should be fine.
@carlosalberto @bogdandrutu Given you already approved it I suppose you favor using the Go-like values, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest sticking with the current name since "all the BSDs end with BSD" seems consistent and consistency is important in a spec I think. In the API we can expect more language considerations, often loosening restraints, for semantic conventions they're just data so should prioritize the data over any language conventions I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also some somewhat academic it does seem like a reasonable safety measure vs someone creating dragonfly linux someday.
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Below is the summary of current arguments as suggested by the contributing guide. Summary of argumentsIn favor of
In favor of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should stay with DRAGONFLYBSD. If we had started with DRAGONFLY, I think it is likely a PR would have come in to change to DRAGONFLYBSD. It seems mostly arbitrary to me which of these names to use, so I vote for not changing it.
Hi all, given the lack of consensus and the arguments against this change presented above I am closing the PR. Thanks all for the comments! |
Changes
The
os.type
values seem inspired by the GOOS list (see here). All the values present both in the OpenTelemetry specification and the GOOS list match except for the one for Dragonfly BSD, which is namedDRAGONFLYBSD
on the spec andDRAGONFLY
on the GOOS list.This PR renames the constant to
DRAGONFLY
in the OpenTelemetry specification. Renaming the constant toDRAGONFLY
makes implementing this convention on Go easier, removing the need to have a special case for this operating system family.See summary of current arguments here