public sealed class Monitoring : Protobuf.IMessage<Monitoring>, Protobuf.IBufferMessage
Monitoring configuration of the service.
The example below shows how to configure monitored resources and metrics
for monitoring. In the example, a monitored resource and two metrics are
defined. The library.googleapis.com/book/returned_count metric is sent
to both producer and consumer projects, whereas the
library.googleapis.com/book/overdue_count metric is only sent to the
consumer project.
monitored_resources:
type: library.googleapis.com/branch
labels:
key: /city
description: The city where the library branch is located in.
key: /name
description: The name of the branch.
metrics:
public Protobuf.Collections.RepeatedField<Monitoring.Types.MonitoringDestination> ConsumerDestinations { get; }
Monitoring configurations for sending metrics to the consumer project.
There can be multiple consumer destinations. A monitored resouce type may
appear in multiple monitoring destinations if different aggregations are
needed for different sets of metrics associated with that monitored
resource type. A monitored resource and metric pair may only be used once
in the Monitoring configuration.
public Protobuf.Collections.RepeatedField<Monitoring.Types.MonitoringDestination> ProducerDestinations { get; }
Monitoring configurations for sending metrics to the producer project.
There can be multiple producer destinations. A monitored resouce type may
appear in multiple monitoring destinations if different aggregations are
needed for different sets of metrics associated with that monitored
resource type. A monitored resource and metric pair may only be used once
in the Monitoring configuration.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["This documentation details the `Monitoring` class within the `Google.Api.CommonProtos` assembly, version 2.2.0, which is used for service monitoring configuration."],["The `Monitoring` class facilitates the configuration of sending metrics to both producer and consumer projects, enabling distinct monitoring setups for each."],["The class includes properties for defining `ProducerDestinations` and `ConsumerDestinations`, allowing for the specification of multiple monitoring destinations and varying metric aggregations."],["Metrics, such as `library.googleapis.com/book/returned_count` and `library.googleapis.com/book/overdue_count`, can be configured with specific `metric_kind` and `value_type` properties to suit different monitoring needs."],["The provided `Monitoring` class inherits from `Object` and implements `Protobuf.IBufferMessage`, and includes methods for cloning, calculating size, equality checks, and serialization."]]],[]]