/
config.proto
85 lines (70 loc) · 4.14 KB
/
config.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
syntax = "proto3";
package envoy.extensions.filters.http.grpc_stats.v3;
import "envoy/config/core/v3/grpc_method_list.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_stats.v3";
option java_outer_classname = "ConfigProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_stats/v3;grpc_statsv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: gRPC statistics] gRPC statistics filter
// :ref:`configuration overview <config_http_filters_grpc_stats>`.
// [#extension: envoy.filters.http.grpc_stats]
// gRPC statistics filter configuration
// [#next-free-field: 6]
message FilterConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.http.grpc_stats.v2alpha.FilterConfig";
// If true, the filter maintains a filter state object with the request and response message
// counts.
bool emit_filter_state = 1;
oneof per_method_stat_specifier {
// If set, specifies an allowlist of service/methods that will have individual stats
// emitted for them. Any call that does not match the allowlist will be counted
// in a stat with no method specifier: ``cluster.<name>.grpc.*``.
config.core.v3.GrpcMethodList individual_method_stats_allowlist = 2;
// If set to true, emit stats for all service/method names.
//
// If set to false, emit stats for all service/message types to the same stats without including
// the service/method in the name, with prefix ``cluster.<name>.grpc``. This can be useful if
// service/method granularity is not needed, or if each cluster only receives a single method.
//
// .. attention::
// This option is only safe if all clients are trusted. If this option is enabled
// with untrusted clients, the clients could cause unbounded growth in the number of stats in
// Envoy, using unbounded memory and potentially slowing down stats pipelines.
//
// .. attention::
// If neither ``individual_method_stats_allowlist`` nor ``stats_for_all_methods`` is set, the
// behavior will default to ``stats_for_all_methods=false``. This default value is changed due
// to the previous value being deprecated. This behavior can be changed with runtime override
// ``envoy.deprecated_features.grpc_stats_filter_enable_stats_for_all_methods_by_default``.
google.protobuf.BoolValue stats_for_all_methods = 3;
}
// If true, the filter will gather a histogram for the request time of the upstream.
// It works with :ref:`stats_for_all_methods
// <envoy_v3_api_field_extensions.filters.http.grpc_stats.v3.FilterConfig.stats_for_all_methods>`
// and :ref:`individual_method_stats_allowlist
// <envoy_v3_api_field_extensions.filters.http.grpc_stats.v3.FilterConfig.individual_method_stats_allowlist>` the same way
// request_message_count and response_message_count works.
bool enable_upstream_stats = 4;
// If true, the filter will replace dots in the grpc_service_name with underscores before emitting
// the metrics. Only works when :ref:`stats_for_all_methods
// <envoy_v3_api_field_extensions.filters.http.grpc_stats.v3.FilterConfig.stats_for_all_methods>`
// is set to true. It could cause metrics to be merged if the edited service name conflicts with
// an existing service. For example there are both service "foo.bar" & "foo_bar" running.
// This config can fix incorrect gRPC metrics with dots because the existing stats tag extractor
// assumes no dots in the gRPC service name. By default this is set as false.
bool replace_dots_in_grpc_service_name = 5;
}
// gRPC statistics filter state object in protobuf form.
message FilterObject {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.http.grpc_stats.v2alpha.FilterObject";
// Count of request messages in the request stream.
uint64 request_message_count = 1;
// Count of response messages in the response stream.
uint64 response_message_count = 2;
}