syntax = "proto3";

package envoy.type.v3;

import "google/protobuf/wrappers.proto";

import "udpa/annotations/status.proto";

option java_package = "io.envoyproxy.envoy.type.v3";
option java_outer_classname = "ScopeProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Scope]

// Stats scope configuration.
// This configuration can be used to create a singleton scope that is shared
// across multiple instances within the process.
// [#next-free-field: 7]
message Scope {
  // Max number of counters allowed in this scope.
  google.protobuf.UInt32Value max_counters = 1;

  // Max number of gauges allowed in this scope.
  google.protobuf.UInt32Value max_gauges = 2;

  // Max number of histograms allowed in this scope.
  google.protobuf.UInt32Value max_histograms = 3;

  // Whether the scope and its stats can be evicted from the store caches.
  // The eviction policy is a mark-and-sweep approach where stats are evicted
  // if they are not updated or accessed between two successive eviction sweeps.
  // The eviction will happen only if the :ref:`stats_eviction_interval <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.stats_eviction_interval>` is configured in
  // the bootstrap.
  bool enable_eviction = 4;

  // The stats scope prefix.
  string prefix = 5;

  // The sharing name of the scope. If non-empty, the scope is shared across
  // multiple instances with the same sharing_name if all fields in this message
  // have the same values.
  string sharing_name = 6;
}
