Skip to content

Improved metrics semantics. Added metrics context enrich via metadata. Introduced mcp tool - #200

Merged
LorenzoTettamanti merged 43 commits into
CortexFlow:0.1.5from
LorenzoTettamanti:metrics-patch
Aug 4, 2026
Merged

Improved metrics semantics. Added metrics context enrich via metadata. Introduced mcp tool#200
LorenzoTettamanti merged 43 commits into
CortexFlow:0.1.5from
LorenzoTettamanti:metrics-patch

Conversation

@LorenzoTettamanti

@LorenzoTettamanti LorenzoTettamanti commented Jul 11, 2026

Copy link
Copy Markdown
Member

Changes

  • Added semantic module to better represent metrics and improve the core structure.
  • Moved old service discovery module in the core library
  • Added metadata enrichment to metrics in user space
  • Improved consumer structure with metadata enrichment
  • Available metadata:
    • tgid
    • command
    • runtime
    • container_name
    • container_id
    • pod_name
    • namespace
  • Added SSL_read and SSL_write event counter using uprobes and uretprobes attached to libssl.so
  • Updated grafana dashboard in Examples/run-with-docker : Added container_name aggregations
  • Added helper function in core library to easily attach uprobes and uretprobes
  • Minor bug fix and refactoring

Tests (including existing bugs)

image:
lorenzotettamanti/cortexflow-metrics:otel-metrics-23

Tests performed

  1. Ran cortexflow-metrics service alongside a toy application. The complete pipeline features frontend+backend + cortexflow-metrics + otel_collector + prometheus + grafana dashboard. The Grafana dashboard template is included in the PR in the folder Example/run-with-docker . The template already perform aggregations using the container-image
  2. MCP tests using opencode with the same setup (frontend+backend + cortexflow-metrics + otel_collector + prometheus + grafana dashboard). MCP returns correct results for all the exposed tools
Schermata del 2026-08-02 14-35-12 Schermata del 2026-08-02 14-35-22 Schermata del 2026-08-02 14-35-29 Schermata del 2026-08-02 14-35-35

Notes (Must read)

  • Default grafana port is 3000
  • Metadata injection is not fully finished yet. but the concept seems promising. Expect some bugs or undefined behaviour during the testing phase. Sometimes the service discovery fails and the container_name metadata returns null . I'll try to fix them in the next update (v0.1.6)

…oints in metrics_tracer.rs. Added CpuFrequency structure
…_alloc mem_alloc_events_total, enter_mem_alloc metrics
…on events. Fixed typo in percpu_alloc_percpu tracepoint
…ce data structure (NetworkMetrics->PacketLossMetrics) update
@LorenzoTettamanti LorenzoTettamanti self-assigned this Jul 11, 2026
@LorenzoTettamanti LorenzoTettamanti added code refactoring Code refactoring rust Pull requests that update Rust code labels Jul 11, 2026
@LorenzoTettamanti LorenzoTettamanti added v0.1.5 Version 0.1.5 issues tracker bug fix PR related to bug fixes labels Jul 11, 2026
@LorenzoTettamanti LorenzoTettamanti moved this to In Progress in CortexFlow v0.1 Jul 11, 2026
@LorenzoTettamanti LorenzoTettamanti changed the title Improved metrics semantics. Bug fix Improved metrics semantics. Added metrics context enrich via metadata. Introduced mcp tool Jul 30, 2026
@LorenzoTettamanti LorenzoTettamanti added the ebpf eBPF related tasks label Jul 30, 2026
…xed pid_tgid extraction using in sched_stat_wait and sched_stat_runtime function
@LorenzoTettamanti
LorenzoTettamanti marked this pull request as ready for review August 2, 2026 11:51
@LorenzoTettamanti
LorenzoTettamanti merged commit 4044522 into CortexFlow:0.1.5 Aug 4, 2026
3 checks passed
@LorenzoTettamanti
LorenzoTettamanti deleted the metrics-patch branch August 5, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix PR related to bug fixes code refactoring Code refactoring ebpf eBPF related tasks rust Pull requests that update Rust code v0.1.5 Version 0.1.5 issues tracker

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

[Feature]: Enhance eBPF data context with metadata [Feature] Implement a semantic layer [Feature] Add cpu metrics

1 participant