add `nodejs.eventloop.time` metric (#1259)
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
This commit is contained in:
parent
b3902e2ba3
commit
b6793e2df7
|
|
@ -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: enhancement
|
||||||
|
|
||||||
|
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
|
||||||
|
component: nodejs
|
||||||
|
|
||||||
|
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
|
||||||
|
note: Adding `nodejs.eventloop.time` metric to 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: [1259]
|
||||||
|
|
@ -59,6 +59,7 @@ body:
|
||||||
- area:log
|
- area:log
|
||||||
- area:messaging
|
- area:messaging
|
||||||
- area:network
|
- area:network
|
||||||
|
- area:nodejs
|
||||||
- area:oci
|
- area:oci
|
||||||
- area:opentracing
|
- area:opentracing
|
||||||
- area:os
|
- area:os
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ body:
|
||||||
- area:log
|
- area:log
|
||||||
- area:messaging
|
- area:messaging
|
||||||
- area:network
|
- area:network
|
||||||
|
- area:nodejs
|
||||||
- area:oci
|
- area:oci
|
||||||
- area:opentracing
|
- area:opentracing
|
||||||
- area:os
|
- area:os
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ body:
|
||||||
- area:log
|
- area:log
|
||||||
- area:messaging
|
- area:messaging
|
||||||
- area:network
|
- area:network
|
||||||
|
- area:nodejs
|
||||||
- area:oci
|
- area:oci
|
||||||
- area:opentracing
|
- area:opentracing
|
||||||
- area:os
|
- area:os
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ Currently, the following namespaces exist:
|
||||||
- [Log](log.md)
|
- [Log](log.md)
|
||||||
- [Messaging](messaging.md)
|
- [Messaging](messaging.md)
|
||||||
- [Network](network.md)
|
- [Network](network.md)
|
||||||
|
- [NodeJS](nodejs.md)
|
||||||
- [OCI](oci.md)
|
- [OCI](oci.md)
|
||||||
- [OpenTracing](opentracing.md)
|
- [OpenTracing](opentracing.md)
|
||||||
- [OS](os.md)
|
- [OS](os.md)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<!--- 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 -->
|
||||||
|
|
||||||
|
# NodeJS
|
||||||
|
|
||||||
|
## Node.js Attributes
|
||||||
|
|
||||||
|
Describes Node.js related attributes.
|
||||||
|
|
||||||
|
| Attribute | Type | Description | Examples | Stability |
|
||||||
|
| ------------------------ | ------ | ----------------------------- | ---------------- | ---------------------------------------------------------------- |
|
||||||
|
| `nodejs.eventloop.state` | string | The state of event loop time. | `active`; `idle` |  |
|
||||||
|
|
||||||
|
`nodejs.eventloop.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 |
|
||||||
|
| -------- | ------------ | ---------------------------------------------------------------- |
|
||||||
|
| `active` | Active time. |  |
|
||||||
|
| `idle` | Idle time. |  |
|
||||||
|
|
@ -21,6 +21,7 @@ This document describes semantic conventions for Node.js Runtime metrics in Open
|
||||||
- [Metric: `nodejs.eventloop.delay.p90`](#metric-nodejseventloopdelayp90)
|
- [Metric: `nodejs.eventloop.delay.p90`](#metric-nodejseventloopdelayp90)
|
||||||
- [Metric: `nodejs.eventloop.delay.p99`](#metric-nodejseventloopdelayp99)
|
- [Metric: `nodejs.eventloop.delay.p99`](#metric-nodejseventloopdelayp99)
|
||||||
- [Metric: `nodejs.eventloop.utilization`](#metric-nodejseventlooputilization)
|
- [Metric: `nodejs.eventloop.utilization`](#metric-nodejseventlooputilization)
|
||||||
|
- [Metric: `nodejs.eventloop.time`](#metric-nodejseventlooptime)
|
||||||
|
|
||||||
<!-- tocstop -->
|
<!-- tocstop -->
|
||||||
|
|
||||||
|
|
@ -316,7 +317,7 @@ This metric is [recommended][MetricRecommended].
|
||||||
| `nodejs.eventloop.utilization` | Gauge | `1` | Event loop utilization. [1] |  |
|
| `nodejs.eventloop.utilization` | Gauge | `1` | Event loop utilization. [1] |  |
|
||||||
|
|
||||||
|
|
||||||
**[1]:** The value range is [0.0,1.0] and can be retrieved from value [`performance.eventLoopUtilization([utilization1[, utilization2]])`](https://nodejs.org/api/perf_hooks.html#performanceeventlooputilizationutilization1-utilization2)
|
**[1]:** The value range is [0.0, 1.0] and can be retrieved from [`performance.eventLoopUtilization([utilization1[, utilization2]])`](https://nodejs.org/api/perf_hooks.html#performanceeventlooputilizationutilization1-utilization2)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -333,6 +334,56 @@ This metric is [recommended][MetricRecommended].
|
||||||
<!-- markdownlint-disable -->
|
<!-- markdownlint-disable -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- markdownlint-restore -->
|
||||||
|
<!-- prettier-ignore-end -->
|
||||||
|
<!-- END AUTOGENERATED TEXT -->
|
||||||
|
<!-- endsemconv -->
|
||||||
|
|
||||||
|
### Metric: `nodejs.eventloop.time`
|
||||||
|
|
||||||
|
This metric is [recommended][MetricRecommended].
|
||||||
|
|
||||||
|
<!-- semconv metric.nodejs.eventloop.time(metric_table) -->
|
||||||
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
||||||
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
||||||
|
<!-- prettier-ignore-start -->
|
||||||
|
<!-- markdownlint-capture -->
|
||||||
|
<!-- markdownlint-disable -->
|
||||||
|
|
||||||
|
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
|
||||||
|
| -------- | --------------- | ----------- | -------------- | --------- |
|
||||||
|
| `nodejs.eventloop.time` | Counter | `s` | Cumulative duration of time the event loop has been in each state. [1] |  |
|
||||||
|
|
||||||
|
|
||||||
|
**[1]:** Value can be retrieved from [`performance.eventLoopUtilization([utilization1[, utilization2]])`](https://nodejs.org/api/perf_hooks.html#performanceeventlooputilizationutilization1-utilization2)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- markdownlint-restore -->
|
||||||
|
<!-- prettier-ignore-end -->
|
||||||
|
<!-- END AUTOGENERATED TEXT -->
|
||||||
|
<!-- endsemconv -->
|
||||||
|
|
||||||
|
<!-- semconv metric.nodejs.eventloop.time(full) -->
|
||||||
|
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
|
||||||
|
<!-- see templates/registry/markdown/snippet.md.j2 -->
|
||||||
|
<!-- prettier-ignore-start -->
|
||||||
|
<!-- markdownlint-capture -->
|
||||||
|
<!-- markdownlint-disable -->
|
||||||
|
|
||||||
|
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|
||||||
|
|---|---|---|---|---|---|
|
||||||
|
| [`nodejs.eventloop.state`](/docs/attributes-registry/nodejs.md) | string | The state of event loop time. | `active`; `idle` | `Required` |  |
|
||||||
|
|
||||||
|
`nodejs.eventloop.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 |
|
||||||
|
|---|---|---|
|
||||||
|
| `active` | Active time. |  |
|
||||||
|
| `idle` | Idle time. |  |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- markdownlint-restore -->
|
<!-- markdownlint-restore -->
|
||||||
<!-- prettier-ignore-end -->
|
<!-- prettier-ignore-end -->
|
||||||
<!-- END AUTOGENERATED TEXT -->
|
<!-- END AUTOGENERATED TEXT -->
|
||||||
|
|
|
||||||
|
|
@ -77,5 +77,19 @@ groups:
|
||||||
unit: "1"
|
unit: "1"
|
||||||
stability: experimental
|
stability: experimental
|
||||||
note: >
|
note: >
|
||||||
The value range is [0.0,1.0] and can be retrieved from value
|
The value range is [0.0, 1.0] and can be retrieved from
|
||||||
|
[`performance.eventLoopUtilization([utilization1[, utilization2]])`](https://nodejs.org/api/perf_hooks.html#performanceeventlooputilizationutilization1-utilization2)
|
||||||
|
|
||||||
|
- id: metric.nodejs.eventloop.time
|
||||||
|
type: metric
|
||||||
|
metric_name: nodejs.eventloop.time
|
||||||
|
brief: "Cumulative duration of time the event loop has been in each state."
|
||||||
|
instrument: counter
|
||||||
|
unit: "s"
|
||||||
|
stability: experimental
|
||||||
|
attributes:
|
||||||
|
- ref: nodejs.eventloop.state
|
||||||
|
requirement_level: required
|
||||||
|
note: >
|
||||||
|
Value can be retrieved from
|
||||||
[`performance.eventLoopUtilization([utilization1[, utilization2]])`](https://nodejs.org/api/perf_hooks.html#performanceeventlooputilizationutilization1-utilization2)
|
[`performance.eventLoopUtilization([utilization1[, utilization2]])`](https://nodejs.org/api/perf_hooks.html#performanceeventlooputilizationutilization1-utilization2)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
groups:
|
||||||
|
- id: registry.nodejs
|
||||||
|
type: attribute_group
|
||||||
|
brief: Describes Node.js related attributes.
|
||||||
|
display_name: Node.js Attributes
|
||||||
|
attributes:
|
||||||
|
- id: nodejs.eventloop.state
|
||||||
|
stability: experimental
|
||||||
|
brief: The state of event loop time.
|
||||||
|
type:
|
||||||
|
members:
|
||||||
|
- id: active
|
||||||
|
value: 'active'
|
||||||
|
brief: 'Active time.'
|
||||||
|
stability: experimental
|
||||||
|
- id: idle
|
||||||
|
value: 'idle'
|
||||||
|
brief: 'Idle time.'
|
||||||
|
stability: experimental
|
||||||
Loading…
Reference in New Issue