Skip to content

feat: add built-in metrics and Prometheus exporter - #50

Merged
noneandundefined merged 49 commits into
mainfrom
feat/metrics-docs-semver-44
Sep 20, 2026
Merged

noneandundefined merged 49 commits into
mainfrom
feat/metrics-docs-semver-44

Conversation

@noneandundefined

Copy link
Copy Markdown
Contributor

Summary

  • implement issue [Feature]: Built-in metrics and Prometheus exporter #44 with optional per-server metrics
  • add thread-safe cHTTPX_ServerMetrics() snapshots
  • add one-call Prometheus exporter registration with cHTTPX_MetricsRoute()
  • collect request/in-flight, connection, status-class, byte, latency, parser, timeout and rate-limit metrics
  • aggregate route metrics by registered route template rather than raw request paths
  • add concurrent integration coverage and a snapshot overhead micro-benchmark
  • add monitoring example and EN/RU metrics documentation
  • remove the standalone benchmarks/ directory and compression benchmark target
  • make GitHub Pages generate module content from canonical docs/<module>/README.md files instead of keeping duplicate markdown under docs/site/content
  • expose TLS, compression and metrics documentation on the website
  • fix automatic SemVer calculation so feat: bumps minor, fixes/maintenance bump patch, and breaking changes bump major
  • fix release build dependencies for the standard zlib-enabled build

SemVer behavior

Examples:

  • v1.4.6 + feat: ... -> v1.5.0
  • v1.5.0 + fix: ... -> v1.5.1
  • v1.5.1 + feat!: ... or BREAKING CHANGE: -> v2.0.0

Metrics

chttpx_config_t config = cHTTPX_DefaultConfig();
config.metrics_enabled = true;

chttpx_serv_t *server = cHTTPX_AppServer(&app, "api", &config);
chttpx_router_t router = cHTTPX_RoutePathPrefix(server, "");

cHTTPX_MetricsRoute(&router, "/metrics");

Metrics stay disabled by default.

Closes #44

@github-actions github-actions Bot added documentation Improvements or additions to documentation ci core api packaging labels Sep 20, 2026
@noneandundefined
noneandundefined merged commit e2982b8 into main Sep 20, 2026
12 checks passed
@noneandundefined
noneandundefined deleted the feat/metrics-docs-semver-44 branch September 20, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api ci core documentation Improvements or additions to documentation packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Built-in metrics and Prometheus exporter

1 participant