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

Merged
merged 44 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d761323
Add node.js runtime metrics semantic conventions
maryliag May 1, 2024
b6b9607
use counter instead of histograms
maryliag May 1, 2024
e021d98
move nodejs attributes to attributes registry
maryliag May 1, 2024
9e7308a
fix brief and change counter to gauge
maryliag May 2, 2024
ff45d4e
add _libuv to active request metric name
maryliag May 2, 2024
7ba81cf
add heap memory and eventloop utilization
maryliag May 3, 2024
a8339d4
rename nodejs to jsruntime
maryliag May 3, 2024
080f181
remove libuv metric
maryliag May 3, 2024
f311e2b
use histogram for gc.duration
maryliag May 8, 2024
5c1720c
rename from jsruntime to nodejsruntime
maryliag May 8, 2024
90a3ecc
add note on range for eventloop utilization
maryliag May 8, 2024
3388767
rename eventoloop.lag to eventloop.delay
maryliag May 8, 2024
fb9eeee
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
maryliag May 8, 2024
46608a6
split between nodejs and v8 js engine metrics
maryliag May 8, 2024
a68fca6
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
maryliag May 8, 2024
1272060
split heap size memory
maryliag May 8, 2024
5037304
separate metric for heap size on eventloop delay
maryliag May 8, 2024
2f771ed
add note on v8
maryliag May 8, 2024
c97935e
shorten the names, removing "runtime"
maryliag May 21, 2024
0b31be3
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
maryliag May 21, 2024
d345f67
shorten v8 name
maryliag May 21, 2024
ca46bf0
regenerate docs
maryliag May 21, 2024
3970c94
change to gauge
maryliag May 21, 2024
fbeb7e0
remove v8 metrics to be added to another pr
maryliag May 23, 2024
44cd8eb
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
maryliag May 23, 2024
bf0a6c8
add nodeJS acronym
maryliag Jun 4, 2024
244b197
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
maryliag Jun 4, 2024
2291eea
remove "runtime" from attributes model, which is generic
maryliag Jun 4, 2024
b99aaf9
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
maryliag Jun 4, 2024
4cd4f38
add p in ids
maryliag Jun 13, 2024
360c12d
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
maryliag Jun 13, 2024
162123f
make node version a resource attribute
maryliag Jun 13, 2024
1cc7281
regenerate docs
maryliag Jun 13, 2024
64cd188
fix lint
maryliag Jun 13, 2024
71c54a0
remove nodejs version
maryliag Jun 13, 2024
884b7dd
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
maryliag Jun 13, 2024
81f10f9
fix lint
maryliag Jun 13, 2024
07248f1
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
maryliag Jun 20, 2024
21466cf
add source of data on notes
maryliag Jun 21, 2024
c2874b9
fix lint
maryliag Jun 21, 2024
6eb827f
remove unused key
maryliag Jun 21, 2024
660d010
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
maryliag Jun 24, 2024
5aeaa8a
Merge branch 'main' into nodejs-metrics
lmolkova Jun 28, 2024
cff8f08
add note for eventloop delay
maryliag Jun 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .chloggen/nodejsruntime-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: new_component

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: nodejsruntime, v8jsengineruntime

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Introducing semantic conventions for V8 JS Engine and Node.js runtime metrics.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [990]
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ body:
- area:log
- area:messaging
- area:network
- area:nodejsruntime
- area:oci
- area:opentracing
- area:os
Expand All @@ -70,6 +71,7 @@ body:
- area:tls
- area:url
- area:user-agent
- area:v8jsengineruntime
- area:webengine
# End semconv area list
- type: textarea
Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/change_proposal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ body:
- area:log
- area:messaging
- area:network
- area:nodejsruntime
- area:oci
- area:opentracing
- area:os
Expand All @@ -63,6 +64,7 @@ body:
- area:tls
- area:url
- area:user-agent
- area:v8jsengineruntime
- area:webengine
# End semconv area list
- type: textarea
Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/new-conventions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ body:
- area:log
- area:messaging
- area:network
- area:nodejsruntime
- area:oci
- area:opentracing
- area:os
Expand All @@ -72,6 +73,7 @@ body:
- area:tls
- area:url
- area:user-agent
- area:v8jsengineruntime
- area:webengine
# End semconv area list
- type: textarea
Expand Down
2 changes: 2 additions & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Currently, the following namespaces exist:
- [Log](log.md)
- [Messaging](messaging.md)
- [Network](network.md)
- [Nodejsruntime](nodejsruntime.md)
- [OCI](oci.md)
- [OpenTracing](opentracing.md)
- [OS](os.md)
Expand All @@ -83,6 +84,7 @@ Currently, the following namespaces exist:
- [TLS](tls.md)
- [URL](url.md)
- [User Agent](user-agent.md)
- [V8jsengineruntime](v8jsengineruntime.md)
- [Webengine](webengine.md)

[developers recommendations]: ../general/attribute-naming.md#recommendations-for-application-developers
15 changes: 15 additions & 0 deletions docs/attributes-registry/nodejsruntime.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->

# Nodejsruntime

## Nodejsruntime Attributes

Describes Node.js Runtime related attributes.

| Attribute | Type | Description | Examples | Stability |
| ----------------------- | ------ | ------------------------ | -------------------- | ---------------------------------------------------------------- |
| `nodejsruntime.version` | string | Node.js Runtime version. | `v22.0.0`; `v21.7.3` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
51 changes: 51 additions & 0 deletions docs/attributes-registry/v8jsengineruntime.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->

# V8jsengineruntime

## V8jsengineruntime Attributes

Describes V8 JS Engine Runtime related attributes.

| Attribute | Type | Description | Examples | Stability |
| ----------------------------------- | ------ | ------------------------------------------ | -------------------------------------- | ---------------------------------------------------------------- |
| `v8jsengineruntime.gc.type` | string | The type of garbage collection. | `major`; `minor`; `incremental` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `v8jsengineruntime.heap.size.state` | string | The size of heap memory. | `total`; `used` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `v8jsengineruntime.heap.space.name` | string | The name of the space type of heap memory. | `new_space`; `old_space`; `code_space` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `v8jsengineruntime.memory.state` | string | The state of memory. | `total`; `used` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`v8jsengineruntime.gc.type` 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.

| Value | Description | Stability |
| ------------- | ---------------------------------------- | ---------------------------------------------------------------- |
| `major` | Major (Mark Sweep Compact). | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `minor` | Minor (Scavenge). | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `incremental` | Incremental (Incremental Marking). | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `weakcb` | Weak Callbacks (Process Weak Callbacks). | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`v8jsengineruntime.heap.size.state` 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.

| Value | Description | Stability |
| ------- | ----------------------- | ---------------------------------------------------------------- |
| `total` | Total heap memory size. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `used` | Used heap memory size. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`v8jsengineruntime.heap.space.name` 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.

| Value | Description | Stability |
| -------------------- | -------------------------- | ---------------------------------------------------------------- |
| `new_space` | New memory space. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `old_space` | Old memory space. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `code_space` | Code memory space. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `map_space` | Map memory space. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `large_object_space` | Large object memory space. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`v8jsengineruntime.memory.state` 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.

| Value | Description | Stability |
| ------- | ------------- | ---------------------------------------------------------------- |
| `total` | Total memory. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `used` | Used memory. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
2 changes: 2 additions & 0 deletions docs/runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Also consider the
semantic conventions when instrumenting runtime environments.

- [JVM](jvm-metrics.md)
- [V8 JS Engine](v8jsengineruntime-metrics.md)
- [Node.js](nodejsruntime-metrics.md)

### Attributes

Expand Down
164 changes: 164 additions & 0 deletions docs/runtime/nodejsruntime-metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: Node.js Runtime
--->

# Semantic Conventions for Node.js Runtime Metrics

**Status**: [Experimental][DocumentStatus]

This document describes semantic conventions for Node.js Runtime metrics in OpenTelemetry.

<!-- Re-generate TOC with `markdown-toc --no-first-h1 -i` -->

<!-- toc -->

- [Experimental](#experimental)
- [Metric: `nodejsruntime.eventloop.delay.min`](#metric-nodejsruntimeeventloopdelaymin)
- [Metric: `nodejsruntime.eventloop.delay.max`](#metric-nodejsruntimeeventloopdelaymax)
- [Metric: `nodejsruntime.eventloop.delay.mean`](#metric-nodejsruntimeeventloopdelaymean)
- [Metric: `nodejsruntime.eventloop.delay.stddev`](#metric-nodejsruntimeeventloopdelaystddev)
- [Metric: `nodejsruntime.eventloop.delay.p50`](#metric-nodejsruntimeeventloopdelayp50)
- [Metric: `nodejsruntime.eventloop.delay.p90`](#metric-nodejsruntimeeventloopdelayp90)
- [Metric: `nodejsruntime.eventloop.delay.p99`](#metric-nodejsruntimeeventloopdelayp99)
- [Metric: `nodejsruntime.eventloop.utilization`](#metric-nodejsruntimeeventlooputilization)

<!-- tocstop -->

## Experimental

**Status**: [Experimental][DocumentStatus]

**Description:** Experimental Node.js Runtime metrics captured under `nodejsruntime`.

### Metric: `nodejsruntime.eventloop.delay.min`

This metric is [recommended][MetricRecommended].

<!-- semconv metric.nodejsruntime.eventloop.delay.min(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `nodejsruntime.eventloop.delay.min` | Gauge | `s` | Event loop minimum delay. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

<!-- semconv metric.nodejsruntime.eventloop.delay.min(full) -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`nodejsruntime.version`](/docs/attributes-registry/nodejsruntime.md) | string | Node.js Runtime version. | `v22.0.0`; `v21.7.3` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

### Metric: `nodejsruntime.eventloop.delay.max`

This metric is [recommended][MetricRecommended].

<!-- semconv metric.nodejsruntime.eventloop.delay.max(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `nodejsruntime.eventloop.delay.max` | Gauge | `s` | Event loop maximum delay. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

<!-- semconv metric.nodejsruntime.eventloop.delay.max(full) -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`nodejsruntime.version`](/docs/attributes-registry/nodejsruntime.md) | string | Node.js Runtime version. | `v22.0.0`; `v21.7.3` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

### Metric: `nodejsruntime.eventloop.delay.mean`

This metric is [recommended][MetricRecommended].

<!-- semconv metric.nodejsruntime.eventloop.delay.mean(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `nodejsruntime.eventloop.delay.mean` | Gauge | `s` | Event loop mean delay. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

<!-- semconv metric.nodejsruntime.eventloop.delay.mean(full) -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`nodejsruntime.version`](/docs/attributes-registry/nodejsruntime.md) | string | Node.js Runtime version. | `v22.0.0`; `v21.7.3` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

### Metric: `nodejsruntime.eventloop.delay.stddev`

This metric is [recommended][MetricRecommended].

<!-- semconv metric.nodejsruntime.eventloop.delay.stddev(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `nodejsruntime.eventloop.delay.stddev` | Gauge | `s` | Event loop standard deviation delay. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

<!-- semconv metric.nodejsruntime.eventloop.delay.stddev(full) -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`nodejsruntime.version`](/docs/attributes-registry/nodejsruntime.md) | string | Node.js Runtime version. | `v22.0.0`; `v21.7.3` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

### Metric: `nodejsruntime.eventloop.delay.p50`

This metric is [recommended][MetricRecommended].

<!-- semconv metric.nodejsruntime.eventloop.delay.pfifty(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `nodejsruntime.eventloop.delay.p50` | Gauge | `s` | Event loop 50 percentile delay. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

<!-- semconv metric.nodejsruntime.eventloop.delay.pfifty(full) -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`nodejsruntime.version`](/docs/attributes-registry/nodejsruntime.md) | string | Node.js Runtime version. | `v22.0.0`; `v21.7.3` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

### Metric: `nodejsruntime.eventloop.delay.p90`

This metric is [recommended][MetricRecommended].

<!-- semconv metric.nodejsruntime.eventloop.delay.ninety(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `nodejsruntime.eventloop.delay.p90` | Gauge | `s` | Event loop 90 percentile delay. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

<!-- semconv metric.nodejsruntime.eventloop.delay.ninety(full) -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`nodejsruntime.version`](/docs/attributes-registry/nodejsruntime.md) | string | Node.js Runtime version. | `v22.0.0`; `v21.7.3` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

### Metric: `nodejsruntime.eventloop.delay.p99`

This metric is [recommended][MetricRecommended].

<!-- semconv metric.nodejsruntime.eventloop.delay.ninety_nine(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `nodejsruntime.eventloop.delay.p99` | Gauge | `s` | Event loop 99 percentile delay. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

<!-- semconv metric.nodejsruntime.eventloop.delay.ninety_nine(full) -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`nodejsruntime.version`](/docs/attributes-registry/nodejsruntime.md) | string | Node.js Runtime version. | `v22.0.0`; `v21.7.3` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

### Metric: `nodejsruntime.eventloop.utilization`

This metric is [recommended][MetricRecommended].

<!-- semconv metric.nodejsruntime.eventloop.utilization(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
| -------- | --------------- | ----------- | -------------- | --------- |
| `nodejsruntime.eventloop.utilization` | Gauge | `1` | Event loop utilization. [1] | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** The value range is [0.0,1.0].
<!-- endsemconv -->

<!-- semconv metric.nodejsruntime.eventloop.utilization(full) -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`nodejsruntime.version`](/docs/attributes-registry/nodejsruntime.md) | string | Node.js Runtime version. | `v22.0.0`; `v21.7.3` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- endsemconv -->

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.31.0/specification/document-status.md
[MetricRecommended]: /docs/general/metric-requirement-level.md#recommended
Loading
Loading