Class Monitoring (2.7.4)

public final class Monitoring extends GeneratedMessageV3 implements MonitoringOrBuilder

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/num_overdue metric is only sent to the consumer project. monitored_resources:

  • type: library.googleapis.com/Branch display_name: "Library Branch" description: "A branch of a library." launch_stage: GA labels:
    • key: resource_container description: "The Cloud container (ie. project id) for the Branch."
    • key: location description: "The location of the library branch."
    • key: branch_id description: "The id of the branch." metrics:
  • name: library.googleapis.com/book/returned_count display_name: "Books Returned" description: "The count of books that have been returned." launch_stage: GA metric_kind: DELTA value_type: INT64 unit: "1" labels:
    • key: customer_id description: "The id of the customer."
  • name: library.googleapis.com/book/num_overdue display_name: "Books Overdue" description: "The current number of overdue books." launch_stage: GA metric_kind: GAUGE value_type: INT64 unit: "1" labels:
    • key: customer_id description: "The id of the customer." monitoring: producer_destinations:
    • monitored_resource: library.googleapis.com/Branch metrics:
      • library.googleapis.com/book/returned_count consumer_destinations:
    • monitored_resource: library.googleapis.com/Branch metrics:
      • library.googleapis.com/book/returned_count
      • library.googleapis.com/book/num_overdue

Protobuf type google.api.Monitoring

Implements

MonitoringOrBuilder

Static Fields

CONSUMER_DESTINATIONS_FIELD_NUMBER

public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

PRODUCER_DESTINATIONS_FIELD_NUMBER

public static final int PRODUCER_DESTINATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Monitoring getDefaultInstance()
Returns
TypeDescription
Monitoring

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Monitoring.Builder newBuilder()
Returns
TypeDescription
Monitoring.Builder

newBuilder(Monitoring prototype)

public static Monitoring.Builder newBuilder(Monitoring prototype)
Parameter
NameDescription
prototypeMonitoring
Returns
TypeDescription
Monitoring.Builder

parseDelimitedFrom(InputStream input)

public static Monitoring parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Monitoring
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Monitoring parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Monitoring
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Monitoring parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Monitoring
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Monitoring parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Monitoring
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Monitoring parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Monitoring
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Monitoring parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Monitoring
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Monitoring parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Monitoring
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Monitoring parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Monitoring
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Monitoring parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Monitoring
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Monitoring parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Monitoring
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Monitoring parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Monitoring
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Monitoring parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Monitoring
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Monitoring> parser()
Returns
TypeDescription
Parser<Monitoring>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getConsumerDestinations(int index)

public Monitoring.MonitoringDestination getConsumerDestinations(int index)

Monitoring configurations for sending metrics to the consumer project. There can be multiple consumer destinations. A monitored resource 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.

repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Monitoring.MonitoringDestination

getConsumerDestinationsCount()

public int getConsumerDestinationsCount()

Monitoring configurations for sending metrics to the consumer project. There can be multiple consumer destinations. A monitored resource 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.

repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;

Returns
TypeDescription
int

getConsumerDestinationsList()

public List<Monitoring.MonitoringDestination> getConsumerDestinationsList()

Monitoring configurations for sending metrics to the consumer project. There can be multiple consumer destinations. A monitored resource 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.

repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;

Returns
TypeDescription
List<MonitoringDestination>

getConsumerDestinationsOrBuilder(int index)

public Monitoring.MonitoringDestinationOrBuilder getConsumerDestinationsOrBuilder(int index)

Monitoring configurations for sending metrics to the consumer project. There can be multiple consumer destinations. A monitored resource 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.

repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Monitoring.MonitoringDestinationOrBuilder

getConsumerDestinationsOrBuilderList()

public List<? extends Monitoring.MonitoringDestinationOrBuilder> getConsumerDestinationsOrBuilderList()

Monitoring configurations for sending metrics to the consumer project. There can be multiple consumer destinations. A monitored resource 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.

repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;

Returns
TypeDescription
List<? extends com.google.api.Monitoring.MonitoringDestinationOrBuilder>

getDefaultInstanceForType()

public Monitoring getDefaultInstanceForType()
Returns
TypeDescription
Monitoring

getParserForType()

public Parser<Monitoring> getParserForType()
Returns
TypeDescription
Parser<Monitoring>
Overrides

getProducerDestinations(int index)

public Monitoring.MonitoringDestination getProducerDestinations(int index)

Monitoring configurations for sending metrics to the producer project. There can be multiple producer destinations. A monitored resource 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.

repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Monitoring.MonitoringDestination

getProducerDestinationsCount()

public int getProducerDestinationsCount()

Monitoring configurations for sending metrics to the producer project. There can be multiple producer destinations. A monitored resource 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.

repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;

Returns
TypeDescription
int

getProducerDestinationsList()

public List<Monitoring.MonitoringDestination> getProducerDestinationsList()

Monitoring configurations for sending metrics to the producer project. There can be multiple producer destinations. A monitored resource 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.

repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;

Returns
TypeDescription
List<MonitoringDestination>

getProducerDestinationsOrBuilder(int index)

public Monitoring.MonitoringDestinationOrBuilder getProducerDestinationsOrBuilder(int index)

Monitoring configurations for sending metrics to the producer project. There can be multiple producer destinations. A monitored resource 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.

repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Monitoring.MonitoringDestinationOrBuilder

getProducerDestinationsOrBuilderList()

public List<? extends Monitoring.MonitoringDestinationOrBuilder> getProducerDestinationsOrBuilderList()

Monitoring configurations for sending metrics to the producer project. There can be multiple producer destinations. A monitored resource 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.

repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;

Returns
TypeDescription
List<? extends com.google.api.Monitoring.MonitoringDestinationOrBuilder>

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Monitoring.Builder newBuilderForType()
Returns
TypeDescription
Monitoring.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Monitoring.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Monitoring.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Monitoring.Builder toBuilder()
Returns
TypeDescription
Monitoring.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException