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."],[[["\u003cp\u003eThis documentation details the \u003ccode\u003eMonitoring\u003c/code\u003e class within the \u003ccode\u003eGoogle.Api.CommonProtos\u003c/code\u003e assembly, version 2.2.0, which is used for service monitoring configuration.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMonitoring\u003c/code\u003e class facilitates the configuration of sending metrics to both producer and consumer projects, enabling distinct monitoring setups for each.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes properties for defining \u003ccode\u003eProducerDestinations\u003c/code\u003e and \u003ccode\u003eConsumerDestinations\u003c/code\u003e, allowing for the specification of multiple monitoring destinations and varying metric aggregations.\u003c/p\u003e\n"],["\u003cp\u003eMetrics, such as \u003ccode\u003elibrary.googleapis.com/book/returned_count\u003c/code\u003e and \u003ccode\u003elibrary.googleapis.com/book/overdue_count\u003c/code\u003e, can be configured with specific \u003ccode\u003emetric_kind\u003c/code\u003e and \u003ccode\u003evalue_type\u003c/code\u003e properties to suit different monitoring needs.\u003c/p\u003e\n"],["\u003cp\u003eThe provided \u003ccode\u003eMonitoring\u003c/code\u003e class inherits from \u003ccode\u003eObject\u003c/code\u003e and implements \u003ccode\u003eProtobuf.IBufferMessage\u003c/code\u003e, and includes methods for cloning, calculating size, equality checks, and serialization.\u003c/p\u003e\n"]]],[],null,[]]