-
Notifications
You must be signed in to change notification settings - Fork 889
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
Add process.runtime.name / version describing executing runtime #882
Changes from 9 commits
49592a3
2a3feba
9f441cd
ce631d5
0826034
0b19aa9
a0482e0
84f3423
c201764
10df2c7
afedfac
31e2ffe
e5596f2
faf5381
7906c26
9eec3e5
6a3aca1
090e92e
25fe6d2
9544066
054fc9e
accbb0a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -12,5 +12,85 @@ | |||||||||||
| process.command | The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. | `cmd/otelcol` | See below | | ||||||||||||
| process.command_line | The full command used to launch the process. The value can be either a list of strings representing the ordered list of arguments, or a single string representing the full command. On Linux based systems, can be set to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. On Windows, can be set to the result of `GetCommandLineW`. | Linux: `[ cmd/otecol, --config=config.yaml ]`, Windows: `cmd/otecol --config=config.yaml` | See below | | ||||||||||||
| process.owner | The username of the user that owns the process. | `root` | No | | ||||||||||||
| process.runtime.name | The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. | `openjdk` | No | | ||||||||||||
| process.runtime.version | The version of the runtime of this process, as returned by the runtime without modification. | `14.0.2` | No | | ||||||||||||
|
||||||||||||
At least one of `process.executable.name`, `process.executable.path`, `process.command`, or `process.command_line` is required. | ||||||||||||
|
||||||||||||
`process.runtime.name` SHOULD be set to one of the values listed below. | ||||||||||||
arminru marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||
If none of the listed values apply, a custom value best describing the runtime CAN be used. | ||||||||||||
|
||||||||||||
***Erlang Runtimes:*** | ||||||||||||
|
||||||||||||
| Value | Description | | ||||||||||||
| --- | --- | | ||||||||||||
| `beam` | BEAM | | ||||||||||||
| `jam` | JAM | | ||||||||||||
anuraaga marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||
|
||||||||||||
***Go Runtimes:*** | ||||||||||||
|
||||||||||||
| Value | Description | | ||||||||||||
| --- | --- | | ||||||||||||
| `gc` | Go compiler | | ||||||||||||
| `gccgo` | GCC Go frontend | | ||||||||||||
Comment on lines
+42
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These seem to cover the Go language implementations that I'm aware of. I'm not sure we've ever tested with Version information can be obtained from the |
||||||||||||
|
||||||||||||
***Java runtimes:*** | ||||||||||||
|
||||||||||||
| Value | Description | | ||||||||||||
| --- | --- | | ||||||||||||
| `openjdk` | Oracle OpenJDK | | ||||||||||||
bogdandrutu marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you checked this list against values returned by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Found that e.g. zulu jdk has a vendor like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If in case of Java we want There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for calling this out. I collected a bunch of properties. https://gist.github.com/anuraaga/c79219a7e4401515c3de998f9d077be0 It looks like the only way to properly express the vendor distribution (which is important, some distributions have totally different runtime components like corretto, openj9) is a concatenation of I'm starting to think I also need to add
It's ok - but still not ideal because version strings aren't consistent either :/ But probably best we can do, backends can probably deal with this well enough.
How does this sound? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is much better, but still misses the info that IBM J9 VM was used :( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah good point - how about |
||||||||||||
| `adoptopenjdk` | AdoptOpenJDK | | ||||||||||||
| `amazon-corretto` | Amazon Corretto | | ||||||||||||
| `dragonwell` | Alibaba Dragonwell | | ||||||||||||
| `graalvm` | GraalVM | | ||||||||||||
| `liberica-openjdk` | Liberica OpenJDK | | ||||||||||||
| `ojdkbuild` | ojdkbuild | | ||||||||||||
| `oraclejdk` | Oracle JDK | | ||||||||||||
| `redhat-openjdk` | Red Hat build of OpenJDK | | ||||||||||||
| `sapmachine` | SapMachine | | ||||||||||||
| `zulu-openjdk` | Zulu OpenJDK | | ||||||||||||
|
||||||||||||
***JavaScript runtimes:*** | ||||||||||||
|
||||||||||||
| Value | Description | | ||||||||||||
| --- | --- | | ||||||||||||
| `nodejs` | NodeJS | | ||||||||||||
| `browser` | Web Browser | | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the user agent string be reported in this case? Or some other browser name/version identification? Or would that name be part of the version? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. User agent parsing is very hairy, so my instinct is to not make the SDK fill in anything smarter here than There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think explicitly saying that in case of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, let me know if it's clear, I don't know how well the new API is supported right now so I'm leaving it out for now but if it seems worth mentioning let me know. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry had forgotten to git push >< Now it has my new line about browser. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should not use the "user-agent" in the version. The runtime:
Or maybe completely exclude I don't have big experience with browsers so I may be wrong. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As browser is a drastically different runtime (even the opentelemetry-js distribution is different for server vs browser) I definitely want to include it somewhere. I feel as if the current recommendation provides good information to backends, and is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That should be good, or maybe just leave TODOs instead of providing things for all the other languages. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added TODOs with linked issues. I hope what's here can be helpful for the language owners, though might not be but lean towards not clearing it out since it's at least something I think. |
||||||||||||
| `iojs` | io.js | | ||||||||||||
| `graalvm` | GraalVM | | ||||||||||||
|
||||||||||||
When the value is `browser`, `process.runtime.version` SHOULD be set to the User-Agent header. | ||||||||||||
|
||||||||||||
***.NET Runtimes:*** | ||||||||||||
|
||||||||||||
| Value | Description | | ||||||||||||
| --- | --- | | ||||||||||||
| `dotnet-core` | .NET Core, .NET 5+ | | ||||||||||||
| `dotnet-framework` | .NET Framework | | ||||||||||||
| `mono` | Mono | | ||||||||||||
|
||||||||||||
***Python Runtimes:*** | ||||||||||||
|
||||||||||||
| Value | Description | | ||||||||||||
| --- | --- | | ||||||||||||
| `cpython` | CPython | | ||||||||||||
| `graalvm` | GraalVM | | ||||||||||||
| `ironpython` | IronPython | | ||||||||||||
| `jython` | Jython | | ||||||||||||
| `pypy` | PyPy| | ||||||||||||
| `pythonnet` | PythonNet | | ||||||||||||
|
||||||||||||
***Ruby Runtimes:*** | ||||||||||||
|
||||||||||||
| Value | Description | | ||||||||||||
| --- | --- | | ||||||||||||
| `rubymri` | Ruby MRI | | ||||||||||||
| `yarv` | YARV | | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Practically speaking, these are the same thing. YARV is the bytecode interpreter for MRI. |
||||||||||||
| `graalvm` | GraalVM | | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be TruffleRuby rather than GraalVM. |
||||||||||||
| `ironruby` | IronRuby | | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't support IronRuby in OTel Ruby.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should that matter? I guess we don't support many of the things here (yet). But maybe some 3rd party vendor will at some point. However, I'm wondering if ironruby can even be considered a runtime in it's own right. It is more like an addon for a .NET CLR, isn't it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Practically speaking, I don't know of anyone using it, or the other implementations below. There's a lot of abandoned alternative Ruby implementations out there. It doesn't seem valuable to catalog them all here. The active implementations that I know of are JRuby, TruffleRuby and MRI. Although JRuby and TruffleRuby can both be considered "addons" for the JVM, it is important to distinguish them - the implementation technologies and functionality are quite different. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TBH, it feels more useful to have a few well known examples here rather than an exhaustive list of all possible values. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
SGTM, but in that case, information about the JVM would still be interesting, right? I wonder how we could represent that in semantic conventions. Using an array for each value? E.g. process.runtime.name=["OpenJDK Runtime Environment", "JRuby"] |
||||||||||||
| `jruby` | JRuby | | ||||||||||||
| `macruby` | MacRuby | | ||||||||||||
| `maglev` | MagLev | | ||||||||||||
| `mruby` | Mruby | | ||||||||||||
| `rubinius` | Rubinius | | ||||||||||||
| `rubymotion` | RubyMotion | | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. None of these are supported by OTel Ruby.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That should not matter, we are not writing these semantic conventions solely for our current implementations 😃 |
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.
To avoid confusion: is Java a "compiled" in the sense of this line?
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.
@anuraaga ping :)
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.
Finally updating this PR :) I think no, I use
compiled native
to try to give that impression. Is there a more clear term?