From cb98b32367fc969ce15f0617a45484e340b3e03a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Krajcsovits?= Date: Wed, 1 Apr 2026 10:36:40 +0200 Subject: [PATCH] fix(om2): move mermaid diagram outside the spec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently it only renders correctly in github, not the website, so we want to switch to pre-rendering into some picture that the markdown can include. Preferably SVG. Signed-off-by: György Krajcsovits --- docs/specs/om/open_metrics_spec_2_0.md | 50 ------------------- .../docs/specs/om/om2_data_model.mermaid | 49 ++++++++++++++++++ 2 files changed, 49 insertions(+), 50 deletions(-) create mode 100644 public/assets/docs/specs/om/om2_data_model.mermaid diff --git a/docs/specs/om/open_metrics_spec_2_0.md b/docs/specs/om/open_metrics_spec_2_0.md index 593786df2..d3a18ef5c 100644 --- a/docs/specs/om/open_metrics_spec_2_0.md +++ b/docs/specs/om/open_metrics_spec_2_0.md @@ -72,56 +72,6 @@ The word "RESERVED" is used in this document to designate values, names, or fiel This section MUST be read together with the ABNF section. In case of disagreements between the two, the ABNF's restrictions MUST take precedence. -```mermaid -classDiagram - class MetricSet - class MetricFamily - class MetricFamilyType { - <> - gauge - counter - stateset - info - histogram - gaugehistogram - summary - unknown - } - class Metric - class LabelSet - class Label - class Sample - class Timestamp - class Exemplar - class SampleValue { - <> - } - class Number - class CompositeValue - class HistogramValue - class GaugeHistogramValue - class SummaryValue - - MetricSet "1" --> "0..*" MetricFamily - MetricFamily "1" --> "1" MetricFamilyType : type - MetricFamily "1" --> "0..*" Metric - Metric "1" --> "1" LabelSet - Metric "1" --> "1..*" Sample - LabelSet "1" --> "0..*" Label - Sample --> "1" SampleValue : value - Sample --> "0..1" Timestamp : timestamp - Sample --> "0..1" Timestamp : start timestamp - Sample --> "0..*" Exemplar - SampleValue <|-- Number - SampleValue <|-- CompositeValue - CompositeValue <|-- HistogramValue - CompositeValue <|-- GaugeHistogramValue - CompositeValue <|-- SummaryValue - Exemplar --> "1" LabelSet - Exemplar --> "1" Number : value - Exemplar --> "1" Timestamp -``` - ### Data Types #### Sample Values diff --git a/public/assets/docs/specs/om/om2_data_model.mermaid b/public/assets/docs/specs/om/om2_data_model.mermaid new file mode 100644 index 000000000..688818da5 --- /dev/null +++ b/public/assets/docs/specs/om/om2_data_model.mermaid @@ -0,0 +1,49 @@ +```mermaid +classDiagram + class MetricSet + class MetricFamily + class MetricFamilyType { + <> + gauge + counter + stateset + info + histogram + gaugehistogram + summary + unknown + } + class Metric + class LabelSet + class Label + class Sample + class Timestamp + class Exemplar + class SampleValue { + <> + } + class Number + class CompositeValue + class HistogramValue + class GaugeHistogramValue + class SummaryValue + + MetricSet "1" --> "0..*" MetricFamily + MetricFamily "1" --> "1" MetricFamilyType : type + MetricFamily "1" --> "0..*" Metric + Metric "1" --> "1" LabelSet + Metric "1" --> "1..*" Sample + LabelSet "1" --> "0..*" Label + Sample --> "1" SampleValue : value + Sample --> "0..1" Timestamp : timestamp + Sample --> "0..1" Timestamp : start timestamp + Sample --> "0..*" Exemplar + SampleValue <|-- Number + SampleValue <|-- CompositeValue + CompositeValue <|-- HistogramValue + CompositeValue <|-- GaugeHistogramValue + CompositeValue <|-- SummaryValue + Exemplar --> "1" LabelSet + Exemplar --> "1" Number : value + Exemplar --> "1" Timestamp +```