Codex/metrics section 0 1 deps#6366
Draft
shuheiktgw wants to merge 14 commits intomainfrom
Draft
Conversation
Port the metricspp library into the quickwit workspace as a single crate with type-safe, zero-allocation metric declarations built on the metrics crate. Includes two-level caching (thread-local + global DashMap), observable counters/gauges with shadow atomics, RAII GaugeGuard, Labels<N> templates, inventory-based metric discovery, integration tests, property-based hash tests, criterion benchmarks, the http_service example, and the inventory binary. Made-with: Cursor
Move the inventory binary, build.rs (linker flags), and scripts/ from quickwit-metrics into a dedicated quickwit-metrics-inventory crate. Re-export `metrics` and `inventory` types via `$crate::__metrics::` and `$crate::__inventory::` so downstream crates only need `quickwit-metrics` in their Cargo.toml. Made-with: Cursor
Replace name/subsystem/module_path fields with a &'static Metadata reference (provides module_path, target/subsystem, and level) and add static_labels for compile-time label name/value pairs. Update inventory output to group metrics by module path, sorted by key name. Made-with: Cursor
Made-with: Cursor
Export Quickwit metrics through the existing OpenTelemetry OTLP exporter path when enabled, while preserving Prometheus and DogStatsD routing. Group the telemetry providers and env-filter reload callback into TelemetryHandle so metrics, traces, and logs are initialized and shut down together.
92f2ad0 to
7a01598
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Describe the proposed changes made in this PR.
How was this PR tested?
Describe how you tested this PR.