Class: Google::Apis::LoggingV2::LogExclusion
- Inherits:
-
Object
- Object
- Google::Apis::LoggingV2::LogExclusion
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/logging_v2/classes.rb,
generated/google/apis/logging_v2/representations.rb,
generated/google/apis/logging_v2/representations.rb
Overview
Specifies a set of log entries that are not to be stored in Stackdriver Logging. If your project receives a large volume of logs, you might be able to use exclusions to reduce your chargeable logs. Exclusions are processed after log sinks, so you can export log entries before they are excluded. Audit log entries and log entries from Amazon Web Services are never excluded.
Instance Attribute Summary collapse
-
#description ⇒ String
Optional.
-
#disabled ⇒ Boolean
(also: #disabled?)
Optional.
-
#filter ⇒ String
Required.
-
#name ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LogExclusion
constructor
A new instance of LogExclusion.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ LogExclusion
Returns a new instance of LogExclusion
863 864 865 |
# File 'generated/google/apis/logging_v2/classes.rb', line 863 def initialize(**args) update!(**args) end |
Instance Attribute Details
#description ⇒ String
Optional. A description of this exclusion.
Corresponds to the JSON property description
837 838 839 |
# File 'generated/google/apis/logging_v2/classes.rb', line 837 def description @description end |
#disabled ⇒ Boolean Also known as: disabled?
Optional. If set to True, then this exclusion is disabled and it does not
exclude any log entries. You can use exclusions.patch to change the value of
this field.
Corresponds to the JSON property disabled
844 845 846 |
# File 'generated/google/apis/logging_v2/classes.rb', line 844 def disabled @disabled end |
#filter ⇒ String
Required. An advanced logs filter that matches the log entries to be excluded.
By using the sample function, you can exclude less than 100% of the matching
log entries. For example, the following filter matches 99% of low-severity log
entries from load balancers:
"resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)"
Corresponds to the JSON property filter
854 855 856 |
# File 'generated/google/apis/logging_v2/classes.rb', line 854 def filter @filter end |
#name ⇒ String
Required. A client-assigned identifier, such as "load-balancer-exclusion".
Identifiers are limited to 100 characters and can include only letters, digits,
underscores, hyphens, and periods.
Corresponds to the JSON property name
861 862 863 |
# File 'generated/google/apis/logging_v2/classes.rb', line 861 def name @name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
868 869 870 871 872 873 |
# File 'generated/google/apis/logging_v2/classes.rb', line 868 def update!(**args) @description = args[:description] if args.key?(:description) @disabled = args[:disabled] if args.key?(:disabled) @filter = args[:filter] if args.key?(:filter) @name = args[:name] if args.key?(:name) end |