Semantic Conventions for V8 JS Engine Runtime Metrics

Status: Experimental

This document describes semantic conventions for V8 JS Engine Runtime metrics in OpenTelemetry. This engine is used in some javascript runtime such as Node.js and Deno.

Experimental

Status: Experimental

Description: Experimental V8 JS Engine Runtime metrics captured under v8js.

Metric: v8js.gc.duration

This metric is recommended.

This metric SHOULD be specified with ExplicitBucketBoundaries of [ 0.01, 0.1, 1, 10 ].

NameInstrument TypeUnit (UCUM)DescriptionStability
v8js.gc.durationHistogramsGarbage collection duration. [1]Experimental

[1]: The values can be retrieve from perf_hooks.PerformanceObserver(...).observe({ entryTypes: ['gc'] })

AttributeTypeDescriptionExamplesRequirement LevelStability
v8js.gc.typestringThe type of garbage collection.major; minor; incrementalRequiredExperimental

v8js.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.

ValueDescriptionStability
incrementalIncremental (Incremental Marking).Experimental
majorMajor (Mark Sweep Compact).Experimental
minorMinor (Scavenge).Experimental
weakcbWeak Callbacks (Process Weak Callbacks).Experimental

Metric: v8js.memory.heap.limit

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
v8js.memory.heap.limitUpDownCounterByTotal heap memory size pre-allocated. [1]Experimental

[1]: The value can be retrieved from value space_size of v8.getHeapSpaceStatistics()

AttributeTypeDescriptionExamplesRequirement LevelStability
v8js.heap.space.namestringThe name of the space type of heap memory. [1]new_space; old_space; code_spaceRequiredExperimental

[1] v8js.heap.space.name: Value can be retrieved from value space_name of v8.getHeapSpaceStatistics()


v8js.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.

ValueDescriptionStability
code_spaceCode memory space.Experimental
large_object_spaceLarge object memory space.Experimental
map_spaceMap memory space.Experimental
new_spaceNew memory space.Experimental
old_spaceOld memory space.Experimental

Metric: v8js.memory.heap.used

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
v8js.memory.heap.usedUpDownCounterByHeap Memory size allocated. [1]Experimental

[1]: The value can be retrieved from value space_used_size of v8.getHeapSpaceStatistics()

AttributeTypeDescriptionExamplesRequirement LevelStability
v8js.heap.space.namestringThe name of the space type of heap memory. [1]new_space; old_space; code_spaceRequiredExperimental

[1] v8js.heap.space.name: Value can be retrieved from value space_name of v8.getHeapSpaceStatistics()


v8js.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.

ValueDescriptionStability
code_spaceCode memory space.Experimental
large_object_spaceLarge object memory space.Experimental
map_spaceMap memory space.Experimental
new_spaceNew memory space.Experimental
old_spaceOld memory space.Experimental

Metric: v8js.heap.space.available_size

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
v8js.heap.space.available_sizeUpDownCounterByHeap space available size. [1]Experimental

[1]: Value can be retrieved from value space_available_size of v8.getHeapSpaceStatistics()

AttributeTypeDescriptionExamplesRequirement LevelStability
v8js.heap.space.namestringThe name of the space type of heap memory. [1]new_space; old_space; code_spaceRequiredExperimental

[1] v8js.heap.space.name: Value can be retrieved from value space_name of v8.getHeapSpaceStatistics()


v8js.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.

ValueDescriptionStability
code_spaceCode memory space.Experimental
large_object_spaceLarge object memory space.Experimental
map_spaceMap memory space.Experimental
new_spaceNew memory space.Experimental
old_spaceOld memory space.Experimental

Metric: v8js.heap.space.physical_size

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
v8js.heap.space.physical_sizeUpDownCounterByCommitted size of a heap space. [1]Experimental

[1]: Value can be retrieved from value physical_space_size of v8.getHeapSpaceStatistics()

AttributeTypeDescriptionExamplesRequirement LevelStability
v8js.heap.space.namestringThe name of the space type of heap memory. [1]new_space; old_space; code_spaceRequiredExperimental

[1] v8js.heap.space.name: Value can be retrieved from value space_name of v8.getHeapSpaceStatistics()


v8js.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.

ValueDescriptionStability
code_spaceCode memory space.Experimental
large_object_spaceLarge object memory space.Experimental
map_spaceMap memory space.Experimental
new_spaceNew memory space.Experimental
old_spaceOld memory space.Experimental