-
Notifications
You must be signed in to change notification settings - Fork 5.2k
access_logger: add new logger to record metrics derived from substitution formatter values #41770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
4bac0aa
http: add new filter to record request timing stats
ggreenway 70780d5
new version
ggreenway eb5bf13
map->list
ggreenway 5e26f96
remove duration
ggreenway 4e007d8
add fixed value option
ggreenway 1612f76
extension formatters
ggreenway 8ac56c6
move
ggreenway 7e3bdf4
fix BUILDs
ggreenway d879a14
format; remove Event type in favor of fixed increaes value
ggreenway 84a8073
add more histogram units; move enum
ggreenway aa9c227
Starting to implement
ggreenway 77a9430
iterate on API
ggreenway 963417e
implement latest version of api
ggreenway 2c67343
add extension metadata
ggreenway 8b6ea32
add missing files
ggreenway 24dcccc
add evictable to dictionary
ggreenway f2a9491
add codeowners
ggreenway 32918b6
format
ggreenway 6c2ac6e
add counters implementation
ggreenway fba6518
add integration test; allow atoi on formatted values
ggreenway 61e0ea5
add missing BUILD file
ggreenway f37fa81
Merge remote-tracking branch 'upstream/main' into timing_stats
ggreenway acc1ff6
move unit and add implementation for it
ggreenway cf9fda4
cleanup includes
ggreenway fabc985
convert integration test config to yaml for readability
ggreenway 074a326
add more docs
ggreenway 7970417
format
ggreenway 497787c
add tests, fixes
ggreenway ce0bfb8
release note
ggreenway 29bb77a
fixes
ggreenway 732267f
Merge remote-tracking branch 'upstream/main' into timing_stats
ggreenway File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. | ||
|
|
||
| load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") | ||
|
|
||
| licenses(["notice"]) # Apache 2 | ||
|
|
||
| api_proto_package( | ||
| deps = ["@com_github_cncf_xds//udpa/annotations:pkg"], | ||
| ) |
75 changes: 75 additions & 0 deletions
75
api/envoy/extensions/filters/http/timing_stats/v3/timing_stats.proto
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package envoy.extensions.filters.http.timing_stats.v3; | ||
|
|
||
| import "envoy/type/matcher/v3/string.proto"; | ||
|
|
||
| import "google/protobuf/wrappers.proto"; | ||
| import "google/protobuf/duration.proto"; | ||
|
|
||
| import "udpa/annotations/status.proto"; | ||
|
|
||
| option java_package = "io.envoyproxy.envoy.extensions.filters.http.timing_stats.v3"; | ||
| option java_outer_classname = "TimingStatsProto"; | ||
| option java_multiple_files = true; | ||
| option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/timing_stats/v3;timing_statsv3"; | ||
| option (udpa.annotations.file_status).package_version_status = ACTIVE; | ||
|
|
||
| // [#protodoc-title: Timing_stats] | ||
| // [#extension: envoy.filters.http.timing_stats] | ||
|
|
||
| message Config { | ||
| message TagFormatString { | ||
| string format_string = 1; | ||
|
|
||
| // Valid values for this tag. If empty, any value is allowed. Must match at least 1 matcher. | ||
| repeated type.matcher.v3.StringMatcher allowed_values = 2; | ||
| } | ||
|
|
||
| message TagValue { | ||
| // onoeof these | ||
| string fixed_string = 1; | ||
| TagFormatString format_string = 2; | ||
| } | ||
|
|
||
| message Stat { | ||
| string name = 1 [(validate.rules).string = {min_len: 1}]; | ||
| map<string, TagValue> tags = 2; | ||
| google.protobuf.UInt32Value max_cardinality = 3; | ||
|
|
||
| // How would this be implemented? @kyessenov you've done some work in this area, right? | ||
| // Or should the expiration be at the filter config level, not the individual stat? | ||
| google.protobuf.Duration expiration = 4; | ||
ggreenway marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
|
|
||
| enum TimeUnit { | ||
| Milliseconds = 0; | ||
| Microseconds = 1; | ||
| Nanoseconds = 2; | ||
| } | ||
|
|
||
| message Histogram { | ||
| Stat stat = 1; | ||
| TimeUnit unit = 2; | ||
| string value = 3; // format string; must evaluate to a number | ||
| } | ||
|
|
||
| // Increase the counter by the amount of `value`. | ||
| message Counter { | ||
| Stat stat = 1; | ||
| string value = 2; // format string; must evaluate to a numeric value | ||
ggreenway marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| // Increment the counter with described tags each time the tags match. | ||
| // This only makes sense if at least one of the tags is TagFormatString | ||
| message Event { // I don't love this name. Any better ideas? | ||
| Stat stat = 1; | ||
| } | ||
|
|
||
| string stat_prefix = 1; | ||
| google.protobuf.UInt32Value max_stats = 2; // Overall maximum number of stats from all types. | ||
| repeated Histogram histograms = 3; | ||
| repeated Counter counters = 4; | ||
| repeated Event events = 5; | ||
| } | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.