logging library
Cloud Logging: log-based metrics and sinks routed to BigQuery / Pub/Sub / Storage / Logging-bucket destinations.
The three sink resources (project, folder, organization) share a
common shape but differ in scope: each entry filters only the log stream
produced under its respective resource hierarchy. project_sink predates
the unified prefix convention and keeps its unprefixed BigqueryOptions /
LogSinkExclusion helper types; the newer folder and organization sinks
use scope-prefixed names to avoid barrel-export collision.
Classes
- BigqueryOptions
-
bigquery_optionsblock. Toggles partitioned tables for BigQuery destinations (date-sharded vs. partitioned by_PARTITIONTIME). - GoogleLoggingFolderSink
-
Factory wrapper for
google_logging_folder_sink(providerhashicorp/google ~> 7.0). - GoogleLoggingMetric
-
Factory wrapper for
google_logging_metric(providerhashicorp/google ~> 7.0). - GoogleLoggingOrganizationSink
-
Factory wrapper for
google_logging_organization_sink(providerhashicorp/google ~> 7.0). - GoogleLoggingProjectSink
-
Factory wrapper for
google_logging_project_sink(providerhashicorp/google ~> 7.0). - LoggingFolderSinkBigqueryOptions
-
bigquery_optionsblock forgoogle_logging_folder_sink. Toggles partitioned tables for BigQuery destinations (date-sharded vs. partitioned by_PARTITIONTIME). - LoggingFolderSinkExclusion
-
One entry in the
exclusionslist forgoogle_logging_folder_sink. Log entries matchingfilterare dropped before being routed to the sink's destination.namemust be unique within the sink. - LoggingMetricBucketOptions
-
bucket_optionsblock (max=1) — histogram bucket boundaries for aDISTRIBUTIONmetric. Pick EXACTLY one of linearBuckets, exponentialBuckets, or explicitBuckets; Terraform enforces the exactly_one_of contract at apply time. - LoggingMetricDescriptor
-
metric_descriptorblock (max=1) — describes the shape of the metric produced by the surrounding GoogleLoggingMetric. When omitted, the API defaults to aDELTA/INT64counter with unit"1". - LoggingMetricExplicitBuckets
-
bucket_options.explicit_buckets(max=1). Specifies arbitrary bucket widths via a monotonically-increasing list of bounds. - LoggingMetricExponentialBuckets
-
bucket_options.exponential_buckets(max=1). Produces an exponential sequence of buckets where bucketiupper bound isscale * growthFactor^i. growthFactor must be > 1. - LoggingMetricLabel
-
One entry in
metric_descriptor.labels— describes a label that the metric carries. The label value is filled in per log entry via the matching extractor expression inGoogleLoggingMetric.labelExtractors. - LoggingMetricLinearBuckets
-
bucket_options.linear_buckets(max=1). Produces a linear sequence of buckets that all have the same width (except the implicit overflow / underflow buckets). - LoggingOrganizationSinkBigqueryOptions
-
bigquery_optionsblock forgoogle_logging_organization_sink. Toggles partitioned tables for BigQuery destinations (date-sharded vs. partitioned by_PARTITIONTIME). - LoggingOrganizationSinkExclusion
-
One entry in the
exclusionslist forgoogle_logging_organization_sink. Log entries matchingfilterare dropped before being routed to the sink's destination.namemust be unique within the sink. - LogSinkExclusion
-
One entry in the
exclusionslist. Log entries matchingfilterare dropped before being routed to the sink's destination.namemust be unique within the sink.
Enums
- LoggingMetricKind
-
metric_descriptor.metric_kind— whether the metric records instantaneous values, deltas, or running totals. For counter metrics (the typical logs-based shape) use LoggingMetricKind.delta. - LoggingMetricLabelValueType
-
metric_descriptor.labels[].value_type— the data type of a label extracted from log entries. The label-level value space is narrower than the descriptor's (noDOUBLE/DISTRIBUTION/MONEY). Defaults to LoggingMetricLabelValueType.string when omitted. - LoggingMetricValueType
-
metric_descriptor.value_type— the value kind recorded per data point. Use LoggingMetricValueType.int64 for counter metrics and LoggingMetricValueType.distribution when pairing with LoggingMetricBucketOptions to build a histogram fromGoogleLoggingMetric.valueExtractor.