-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for using tracing span fields as metrics labels (#87)
* Add editorconfig * Add initial metrics-tracing-context version * Add test_no_labels * Add test_multiple_paths_to_the_same_callsite (fails currently) * Make integration tests runnable in bulk * Add reverse mappings to registry * Handle dynamic labels explicitly in the interface and macros * Provide a default implementation for dynamic metric ops * Update metrics-util * Update metrics-tracing-context * Apply fmt * Fix handling of labels during registration * Add tests for macros * Move identifier into a separate mod * Correct the test at metrics-tracing-context/tests/integration.rs * Switch to using Key instead of Identifier for usual calls * Update utils to use Key instead of Identifier * fixup! Switch to using Key instead of Identifier for usual calls * Update metrics-tracing-context to make the tests pass * Update the exporter crates to use Key instead of Identifier * Apply a workaround for unstable ordering of the snapshot output * Update the bench code with the latest design * Apply workaround for criterion comparison * Completely switch to KeyRef at the API and re-add callsite caching * Removed the option wrapper at Key::labels internally * Removed the option wrapper at Key::labels in the public API * More performant can_use_fast_path * Remove the identifier from metrics and added a simpler one at metrics_util::registry * Rename Key to KeyData and KeyRef to Key * Fix doc-comments * Fix macros benches * Fix registry benches * Document the metrics-tracing-contextc crate * Add test case for various macro forms * Add nested spans test (currently fails) * Better notation for owned key at registry benches * Add criterion workaround at metrics-util/Cargo.toml * Change the Registry for upsert-like API and use DashMap internally * Update prometheus to the new Registry API * Update the metrics-exporter-tcp for new API It doesn't use Registry at all anymore! * Update registry benches * Change the test_nested_spans The iteration, unfortunately, can only happen in the inside-out order of span nesting. We will work around this on another level, and here we just collect all the labels out there. * Implement the code to make the test_nested_spans pass * Add label filtering * More registry benches * Update metrics/src/key.rs Co-authored-by: Toby Lawrence <tobz@users.noreply.github.com> * Update metrics/src/key.rs Co-authored-by: Toby Lawrence <tobz@users.noreply.github.com> * Update metrics-tracing-context/src/lib.rs Co-authored-by: Toby Lawrence <tobz@users.noreply.github.com> * Update metrics-tracing-context/src/label_filter.rs Co-authored-by: Toby Lawrence <tobz@users.noreply.github.com> * Update metrics-macros/src/lib.rs Co-authored-by: Toby Lawrence <tobz@users.noreply.github.com> * Update metrics-macros/src/lib.rs Co-authored-by: Toby Lawrence <tobz@users.noreply.github.com> * Add proper trailing comma handling and parsing tests * Better crate doctest Co-authored-by: Toby Lawrence <tobz@users.noreply.github.com>
- Loading branch information
Showing
28 changed files
with
1,500 additions
and
649 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.rs] | ||
indent_size = 4 |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.