feat(layer): simple renames of flattened event fields#23
Merged
Conversation
697c0b3 to
7ac04d4
Compare
Contributor
There was a problem hiding this comment.
Rust Benchmark (1.89.0)
Details
| Benchmark suite | Current: 4d2b33a | Previous: 7ac04d4 | Ratio |
|---|---|---|---|
new_span/single_thread/1 |
302 ns/iter (± 7) |
287 ns/iter (± 8) |
1.05 |
new_span/multithreaded/1 |
40677 ns/iter (± 2170) |
40732 ns/iter (± 3104) |
1.00 |
new_span/single_thread/10 |
3029 ns/iter (± 169) |
2883 ns/iter (± 18) |
1.05 |
new_span/multithreaded/10 |
43741 ns/iter (± 2506) |
45220 ns/iter (± 1930) |
0.97 |
new_span/single_thread/50 |
15188 ns/iter (± 38) |
14439 ns/iter (± 49) |
1.05 |
new_span/multithreaded/50 |
56235 ns/iter (± 2500) |
58230 ns/iter (± 2369) |
0.97 |
event/root/single_threaded/1 |
789 ns/iter (± 6) |
844 ns/iter (± 15) |
0.93 |
event/root/multithreaded/1 |
41884 ns/iter (± 2211) |
44582 ns/iter (± 2077) |
0.94 |
event/unique_parent/single_threaded/1 |
1089 ns/iter (± 14) |
1095 ns/iter (± 6) |
0.99 |
event/unique_parent/multithreaded/1 |
44772 ns/iter (± 2187) |
48897 ns/iter (± 2181) |
0.92 |
event/shared_parent/multithreaded/1 |
41009 ns/iter (± 2820) |
43973 ns/iter (± 2716) |
0.93 |
event/multi-parent/multithreaded/1 |
42171 ns/iter (± 2836) |
44564 ns/iter (± 1823) |
0.95 |
event/root/single_threaded/10 |
7880 ns/iter (± 114) |
8459 ns/iter (± 195) |
0.93 |
event/root/multithreaded/10 |
46734 ns/iter (± 1975) |
49606 ns/iter (± 2580) |
0.94 |
event/unique_parent/single_threaded/10 |
10947 ns/iter (± 131) |
11000 ns/iter (± 57) |
1.00 |
event/unique_parent/multithreaded/10 |
53522 ns/iter (± 1928) |
54578 ns/iter (± 2789) |
0.98 |
event/shared_parent/multithreaded/10 |
47379 ns/iter (± 2776) |
50632 ns/iter (± 2339) |
0.94 |
event/multi-parent/multithreaded/10 |
73135 ns/iter (± 2700) |
78074 ns/iter (± 3250) |
0.94 |
event/root/single_threaded/50 |
39768 ns/iter (± 794) |
42257 ns/iter (± 593) |
0.94 |
event/root/multithreaded/50 |
99341 ns/iter (± 5575) |
103919 ns/iter (± 4427) |
0.96 |
event/unique_parent/single_threaded/50 |
54667 ns/iter (± 578) |
54736 ns/iter (± 471) |
1.00 |
event/unique_parent/multithreaded/50 |
127352 ns/iter (± 4904) |
135874 ns/iter (± 5806) |
0.94 |
event/shared_parent/multithreaded/50 |
123035 ns/iter (± 7297) |
126711 ns/iter (± 9034) |
0.97 |
event/multi-parent/multithreaded/50 |
392605 ns/iter (± 30782) |
396625 ns/iter (± 28186) |
0.99 |
This comment was automatically generated by workflow using github-action-benchmark.
7ac04d4 to
4d2b33a
Compare
Merged
mladedav
pushed a commit
that referenced
this pull request
Mar 24, 2026
## 🤖 New release * `json-subscriber`: 0.2.7 -> 0.2.8 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.2.8](json-subscriber-v0.2.7...json-subscriber-v0.2.8) - 2026-03-24 ### Added - *(layer)* simple renames of flattened event fields ([#23](#23)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Motivation
Closes #19.
Users sometimes want to rename the fields in events and spans. This allows that specifically for flattened events. This should be done more generally somehow.
Solution
Accept a closure and a state object, calling the closure for every field to assess whether to rename or not. This will most likely be a lookup in a map.