Skip to content
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 node.js runtime metrics semantic conventions #991

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

maryliag
Copy link
Contributor

@maryliag maryliag commented May 1, 2024

Part Of #990

Changes

Adding semantic conventions for Node.js runtime metrics

Merge requirement checklist

@maryliag maryliag force-pushed the nodejs-metrics branch 2 times, most recently from 0415b17 to 8b98001 Compare May 1, 2024 13:38
@maryliag
Copy link
Contributor Author

maryliag commented May 1, 2024

I wasn't sure if I need to update something on the next, since there was no changes to existing semantic. This is a new one.

@trask
Copy link
Member

trask commented May 1, 2024

cc @open-telemetry/javascript-approvers

model/registry/nodejs.yaml Outdated Show resolved Hide resolved
@maryliag maryliag marked this pull request as ready for review May 2, 2024 15:16
@maryliag maryliag requested review from a team as code owners May 2, 2024 15:16
@Netail
Copy link

Netail commented May 2, 2024

I am wondering whether or not it should be called NodeJS. What if someone uses Deno or Bun?

@maryliag maryliag force-pushed the nodejs-metrics branch 2 times, most recently from 50b741f to 5eb9c53 Compare May 2, 2024 20:39
@maryliag
Copy link
Contributor Author

maryliag commented May 3, 2024

I am wondering whether or not it should be called NodeJS. What if someone uses Deno or Bun?

what about just js ?

@Netail
Copy link

Netail commented May 3, 2024

I am wondering whether or not it should be called NodeJS. What if someone uses Deno or Bun?

what about just js ?

I mean I guess, but also feel like it can be confused with the language instead of the runtime environment

@maryliag
Copy link
Contributor Author

maryliag commented May 3, 2024

I mean I guess, but also feel like it can be confused with the language instead of the runtime environment

if we want to go be definition, it would be runtimejs

@Netail
Copy link

Netail commented May 3, 2024

I mean I guess, but also feel like it can be confused with the language instead of the runtime environment

if we want to go be definition, it would be runtimejs

jsruntime sounds maybe better? idk, might need some extra opinions

@maryliag maryliag force-pushed the nodejs-metrics branch 2 times, most recently from 12a8c9f to ce06636 Compare May 3, 2024 13:50
component: jsruntime

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Introducing semantic conventions for Runtime Javascript (e.g. NodeJS, DenoJS, BunJS) runtime metrics.
Copy link

Choose a reason for hiding this comment

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

I don't believe Deno and Bun use the JS suffix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@pikalovArtemN
Copy link

pikalovArtemN commented May 3, 2024

For my opinion different runtimes need to have diferent preffix.
For example:
node - nodejs
bun - bun
deno - denojs
etc...
Or some attribute that specify what runtime is currently run.
Or metric idk.

Also i think for version we need to set metric like it does in the prom-client library. Attribute in all metrics with version, for my opinion, it's not a good solution.

@maryliag
Copy link
Contributor Author

maryliag commented May 8, 2024

New updates:

  • Metrics separated in 2: node.js (containing only the node.js specific metrics), v8 js engine metrics (that can be used by other js runtime, such as deno)
  • replaced metrics where I was using type attributes to define the type, now they're separate metrics (for example, heap size and eventloop delay)

@maryliag maryliag changed the title Add node.js runtime metrics semantic conventions Add node.js and v8 js engine runtime metrics semantic conventions May 8, 2024
<!-- semconv metric.veightjsengineruntime.memory.size(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `v8jsengineruntime.memory.size` | UpDownCounter | `By` | External memory size. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

Choose a reason for hiding this comment

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

I think it's Gauge. like in prom-client library

@maryliag maryliag changed the title Add node.js and v8 js engine runtime metrics semantic conventions Add node.js runtime metrics semantic conventions May 23, 2024
@maryliag
Copy link
Contributor Author

From the discussion on the SIG meeting, keeping this PR just for node and created a new one for the v8 on #1066


## NodeJS Attributes

Describes Node.js Runtime related attributes.
Copy link
Contributor

Choose a reason for hiding this comment

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

are those always only runtime attributes? I wonder if registry as agnostic entity should have runtime word

Suggested change
Describes Node.js Runtime related attributes.
Describes Node.js related attributes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point, removed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Discussions
Development

Successfully merging this pull request may close these issues.

None yet

8 participants