Watchdog Extension: Profile Action (#12636)
Added a watchdog extension that triggers profiling. Risk Level: Medium (new extension that is optional) Testing: Unit tests Docs Changes: Included (added a reference to the generated extension proto.rst) Release Notes: Included Fixes #11388 Signed-off-by: Kevin Baichoo <kbaichoo@google.com> Mirrored from https://github.com/envoyproxy/envoy @ c88515fc0c8a291992732947671190b37949bbbdmaster-ci-test
parent
380ac8143d
commit
35396f5670
4 changed files with 46 additions and 0 deletions
@ -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_udpa//udpa/annotations:pkg"], |
||||
) |
@ -0,0 +1,35 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.extensions.watchdog.profile_action.v3alpha; |
||||
|
||||
import "google/protobuf/duration.proto"; |
||||
|
||||
import "udpa/annotations/status.proto"; |
||||
import "udpa/annotations/versioning.proto"; |
||||
import "validate/validate.proto"; |
||||
|
||||
option java_package = "io.envoyproxy.envoy.extensions.watchdog.profile_action.v3alpha"; |
||||
option java_outer_classname = "ProfileActionProto"; |
||||
option java_multiple_files = true; |
||||
option (udpa.annotations.file_status).work_in_progress = true; |
||||
option (udpa.annotations.file_status).package_version_status = ACTIVE; |
||||
|
||||
// [#protodoc-title: Watchdog Action that does CPU profiling.] |
||||
// [#extension: envoy.watchdog.profile_action] |
||||
|
||||
// Configuration for the profile watchdog action. |
||||
message ProfileActionConfig { |
||||
// How long the profile should last. If not set defaults to 5 seconds. |
||||
google.protobuf.Duration profile_duration = 1; |
||||
|
||||
// File path to the directory to output profiles. |
||||
string profile_path = 2 [(validate.rules).string = {min_bytes: 1}]; |
||||
|
||||
// Limits the max number of profiles that can be generated by a thread over |
||||
// its lifetime to avoid filling the disk. We keep a map of <tid, count> |
||||
// to track the number of profiles triggered by a particular thread. Only one |
||||
// thread is counted as triggering the profile even though multiple threads |
||||
// might have been eligible for triggering the profile. |
||||
// If not set (i.e. it's 0), a default of 10 will be used. |
||||
uint64 max_profiles_per_thread = 3; |
||||
} |
Loading…
Reference in new issue