Skip to content

feat(om2): add Mermaid class diagram of the data model#2920

Merged
dashpole merged 4 commits intomainfrom
krajo/om2-data-model-diagram
Mar 25, 2026
Merged

feat(om2): add Mermaid class diagram of the data model#2920
dashpole merged 4 commits intomainfrom
krajo/om2-data-model-diagram

Conversation

@krajorama
Copy link
Copy Markdown
Member

@krajorama krajorama commented Mar 25, 2026

Summary

  • Adds a Mermaid class diagram to the Data Model section showing all core classes and their relationships
  • No fields — classes only, to give a high-level structural overview
  • Renders natively on GitHub with no extra tooling required
  • NOTE: MetricGroup is not represented as it's part of the text format , not the model @dashpole

Test plan

  • Verify the diagram renders correctly on GitHub

Signed-off-by: György Krajcsovits gyorgy.krajcsovits@grafana.com

🤖 Coded with Claude Sonnet 4.6. Generated with Claude Code

Adds a high-level UML class diagram rendered via Mermaid showing the
relationships between the core data model classes without fields.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Coded with Claude Sonnet 4.6.
…in diagram

Gauge, Counter, etc. are type values of MetricFamily, not separate classes.
Replace inheritance with a MetricFamilyType enumeration.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Coded with Claude Sonnet 4.6.
…t order

Order is: value, timestamp, start timestamp, exemplar.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Coded with Claude Sonnet 4.6.
…ber/CompositeValue

A Sample has exactly one value which is either a Number or a CompositeValue,
not both simultaneously.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Coded with Claude Sonnet 4.6.
@krajorama krajorama marked this pull request as ready for review March 25, 2026 13:07
@krajorama krajorama requested review from bwplotka, dashpole and ywwg March 25, 2026 13:10
@dashpole
Copy link
Copy Markdown
Contributor

MetricGroup is not represented as it's part of the text format , not the model @dashpole

I'm OK with this. My intent was to define the concept of a "StateSet MetricGroup", and not "MetricGroup" as a general concept.

@dashpole dashpole merged commit 858accd into main Mar 25, 2026
7 checks passed
@dashpole dashpole deleted the krajo/om2-data-model-diagram branch March 25, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants