Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
15 changes: 14 additions & 1 deletion crates/weaver_emit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,10 @@ mod tests {
use weaver_forge::registry::{ResolvedGroup, ResolvedRegistry};
use weaver_resolved_schema::attribute::Attribute;
use weaver_semconv::{
attribute::{AttributeType, Examples, PrimitiveOrArrayTypeSpec, RequirementLevel},
attribute::{
AttributeType, BasicRequirementLevelSpec, Examples, PrimitiveOrArrayTypeSpec,
RequirementLevel,
},
group::{GroupType, InstrumentSpec, SpanKindSpec},
stability::Stability,
};
Expand Down Expand Up @@ -313,6 +316,7 @@ mod tests {
metric_name: None,
instrument: None,
unit: None,
metric_requirement_level: None,
name: None,
lineage: None,
display_name: None,
Expand All @@ -336,6 +340,7 @@ mod tests {
metric_name: Some("test.updowncounter".to_owned()),
instrument: Some(InstrumentSpec::UpDownCounter),
unit: Some("1".to_owned()),
metric_requirement_level: Some(BasicRequirementLevelSpec::Recommended),
name: None,
lineage: None,
display_name: None,
Expand All @@ -358,6 +363,7 @@ mod tests {
metric_name: Some("test.counter".to_owned()),
instrument: Some(InstrumentSpec::Counter),
unit: Some("1".to_owned()),
metric_requirement_level: Some(BasicRequirementLevelSpec::Recommended),
name: None,
lineage: None,
display_name: None,
Expand All @@ -380,6 +386,7 @@ mod tests {
metric_name: Some("test.gauge".to_owned()),
instrument: Some(InstrumentSpec::Gauge),
unit: Some("1".to_owned()),
metric_requirement_level: Some(BasicRequirementLevelSpec::Recommended),
name: None,
lineage: None,
display_name: None,
Expand All @@ -402,6 +409,7 @@ mod tests {
metric_name: Some("test.histogram".to_owned()),
instrument: Some(InstrumentSpec::Histogram),
unit: Some("1".to_owned()),
metric_requirement_level: Some(BasicRequirementLevelSpec::Recommended),
name: None,
lineage: None,
display_name: None,
Expand All @@ -425,6 +433,7 @@ mod tests {
instrument: Some(InstrumentSpec::UpDownCounter),
unit: Some("1".to_owned()),
name: None,
metric_requirement_level: Some(BasicRequirementLevelSpec::Recommended),
lineage: None,
display_name: None,
body: None,
Expand All @@ -446,6 +455,7 @@ mod tests {
metric_name: Some("test.counter.double".to_owned()),
instrument: Some(InstrumentSpec::Counter),
unit: Some("1".to_owned()),
metric_requirement_level: Some(BasicRequirementLevelSpec::Recommended),
name: None,
lineage: None,
display_name: None,
Expand All @@ -468,6 +478,7 @@ mod tests {
metric_name: Some("test.gauge.double".to_owned()),
instrument: Some(InstrumentSpec::Gauge),
unit: Some("1".to_owned()),
metric_requirement_level: Some(BasicRequirementLevelSpec::Recommended),
name: None,
lineage: None,
display_name: None,
Expand All @@ -490,6 +501,7 @@ mod tests {
metric_name: Some("test.histogram.double".to_owned()),
instrument: Some(InstrumentSpec::Histogram),
unit: Some("1".to_owned()),
metric_requirement_level: Some(BasicRequirementLevelSpec::Recommended),
name: None,
lineage: None,
display_name: None,
Expand Down Expand Up @@ -532,6 +544,7 @@ mod tests {
metric_name: None,
instrument: None,
unit: None,
metric_requirement_level: None,
name: Some("session.start".to_owned()),
lineage: None,
display_name: Some("Session Start Event".to_owned()),
Expand Down
1 change: 1 addition & 0 deletions crates/weaver_forge/data/registry/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ metrics:
brief: "Duration of HTTP client requests."
instrument: histogram
unit: "s"
metric_requirement_level: required
stability: stable
attributes:
- ref_group: http.client.server_and_port
Expand Down
14 changes: 13 additions & 1 deletion crates/weaver_forge/data/registry/jvm-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ groups:
deprecated:
reason: obsoleted
note: "Use `metric.jvm.memory.used` instead."

- id: metric.jvm.memory.dont_generate
type: metric
metric_name: jvm.memory.dont_generate
Expand All @@ -80,6 +80,7 @@ groups:
brief: "Measure of memory used."
instrument: updowncounter
unit: "By"
metric_requirement_level: recommended
stability: stable
entity_associations:
- service
Expand Down Expand Up @@ -110,6 +111,7 @@ groups:
brief: "Measure of memory committed."
instrument: updowncounter
unit: "By"
metric_requirement_level: recommended
stability: stable

- id: metric.jvm.memory.limit
Expand All @@ -119,6 +121,7 @@ groups:
brief: "Measure of max obtainable memory."
instrument: updowncounter
unit: "By"
metric_requirement_level: recommended
stability: stable

- id: metric.jvm.memory.used_after_last_gc
Expand All @@ -128,6 +131,7 @@ groups:
brief: "Measure of memory used, as measured after the most recent garbage collection event on this pool."
instrument: updowncounter
unit: "By"
metric_requirement_level: recommended
stability: stable

- id: metric.jvm.gc.duration
Expand All @@ -136,6 +140,7 @@ groups:
brief: "Duration of JVM garbage collection actions."
instrument: histogram
unit: "s"
metric_requirement_level: recommended
attributes:
- id: jvm.gc.name
stability: stable
Expand Down Expand Up @@ -163,6 +168,7 @@ groups:
brief: "Number of executing platform threads."
instrument: updowncounter
unit: "{thread}"
metric_requirement_level: recommended
attributes:
- id: jvm.thread.daemon
stability: stable
Expand Down Expand Up @@ -208,6 +214,7 @@ groups:
brief: "Number of classes loaded since JVM start."
instrument: counter
unit: "{class}"
metric_requirement_level: recommended
stability: stable

- id: metric.jvm.class.unloaded
Expand All @@ -216,6 +223,7 @@ groups:
brief: "Number of classes unloaded since JVM start."
instrument: counter
unit: "{class}"
metric_requirement_level: recommended
stability: stable

- id: metric.jvm.class.count
Expand All @@ -224,6 +232,7 @@ groups:
brief: "Number of classes currently loaded."
instrument: updowncounter
unit: "{class}"
metric_requirement_level: recommended
stability: stable

- id: metric.jvm.cpu.count
Expand All @@ -232,6 +241,7 @@ groups:
brief: "Number of processors available to the Java virtual machine."
instrument: updowncounter
unit: "{cpu}"
metric_requirement_level: recommended
stability: stable

- id: metric.jvm.cpu.time
Expand All @@ -240,6 +250,7 @@ groups:
brief: "CPU time used by the process as reported by the JVM."
instrument: counter
unit: "s"
metric_requirement_level: recommended
stability: stable

- id: metric.jvm.cpu.recent_utilization
Expand All @@ -253,4 +264,5 @@ groups:
[Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getProcessCpuLoad()).
instrument: gauge
unit: "1"
metric_requirement_level: recommended
stability: stable
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This document describes the `http` metrics.

## `http.client.request.duration`
This metric is required.

Duration of HTTP client requests.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This document describes the `jvm` metrics.

## `jvm.class.count`
This metric is recommended.

Number of classes currently loaded.

Expand All @@ -13,6 +14,7 @@ Number of classes currently loaded.
| Stability | Stable |

## `jvm.class.loaded`
This metric is recommended.

Number of classes loaded since JVM start.

Expand All @@ -23,6 +25,7 @@ Number of classes loaded since JVM start.
| Stability | Stable |

## `jvm.class.unloaded`
This metric is recommended.

Number of classes unloaded since JVM start.

Expand All @@ -33,6 +36,7 @@ Number of classes unloaded since JVM start.
| Stability | Stable |

## `jvm.cpu.count`
This metric is recommended.

Number of processors available to the Java virtual machine.

Expand All @@ -43,6 +47,7 @@ Number of processors available to the Java virtual machine.
| Stability | Stable |

## `jvm.cpu.recent_utilization`
This metric is recommended.

Recent CPU utilization for the process as reported by the JVM.

Expand All @@ -55,6 +60,7 @@ The value range is [0.0,1.0]. This utilization is not defined as being for the s
| Stability | Stable |

## `jvm.cpu.time`
This metric is recommended.

CPU time used by the process as reported by the JVM.

Expand All @@ -65,6 +71,7 @@ CPU time used by the process as reported by the JVM.
| Stability | Stable |

## `jvm.gc.duration`
This metric is recommended.

Duration of JVM garbage collection actions.

Expand All @@ -84,6 +91,7 @@ Duration of JVM garbage collection actions.
|

## `jvm.memory.committed`
This metric is recommended.

Measure of memory committed.

Expand All @@ -103,6 +111,7 @@ Measure of memory committed.
|

## `jvm.memory.deprecated`
This metric is .

Measure something deprecated.

Expand All @@ -114,6 +123,7 @@ Measure something deprecated.
| Deprecated | Use `metric.jvm.memory.used` instead. |

## `jvm.memory.limit`
This metric is recommended.

Measure of max obtainable memory.

Expand All @@ -133,6 +143,7 @@ Measure of max obtainable memory.
|

## `jvm.memory.used`
This metric is recommended.

Measure of memory used.

Expand All @@ -158,6 +169,7 @@ Measure of memory used.
|

## `jvm.memory.used_after_last_gc`
This metric is recommended.

Measure of memory used, as measured after the most recent garbage collection event on this pool.

Expand All @@ -177,6 +189,7 @@ Measure of memory used, as measured after the most recent garbage collection eve
|

## `jvm.thread.count`
This metric is recommended.

Number of executing platform threads.

Expand Down
Loading
Loading