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 LoggingProjectSinkBigqueryOptions / LoggingProjectSinkLogSinkExclusion helper types; the newer folder and organization sinks use scope-prefixed names to avoid barrel-export collision.

Classes

GoogleLoggingFolderSink
Factory wrapper for google_logging_folder_sink (provider hashicorp/google ~> 7.0).
GoogleLoggingMetric
Factory wrapper for google_logging_metric (provider hashicorp/google ~> 7.0).
GoogleLoggingOrganizationSink
Factory wrapper for google_logging_organization_sink (provider hashicorp/google ~> 7.0).
GoogleLoggingProjectSink
Factory wrapper for google_logging_project_sink (provider hashicorp/google ~> 7.0).
LoggingFolderSinkBigqueryOptions
bigquery_options block for google_logging_folder_sink. Toggles partitioned tables for BigQuery destinations (date-sharded vs. partitioned by _PARTITIONTIME).
LoggingFolderSinkExclusion
One entry in the exclusions list for google_logging_folder_sink. Log entries matching filter are dropped before being routed to the sink's destination. name must be unique within the sink.
LoggingMetricBucketOptions
bucket_options block (max=1) — histogram bucket boundaries for a DISTRIBUTION metric. Pick EXACTLY one of linearBuckets, exponentialBuckets, or explicitBuckets; Terraform enforces the exactly_one_of contract at apply time.
LoggingMetricDescriptor
metric_descriptor block (max=1) — describes the shape of the metric produced by the surrounding GoogleLoggingMetric. When omitted, the API defaults to a DELTA / INT64 counter 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 bucket i upper bound is scale * 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 in GoogleLoggingMetric.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_options block for google_logging_organization_sink. Toggles partitioned tables for BigQuery destinations (date-sharded vs. partitioned by _PARTITIONTIME).
LoggingOrganizationSinkExclusion
One entry in the exclusions list for google_logging_organization_sink. Log entries matching filter are dropped before being routed to the sink's destination. name must be unique within the sink.
LoggingProjectSinkBigqueryOptions
bigquery_options block. Toggles partitioned tables for BigQuery destinations (date-sharded vs. partitioned by _PARTITIONTIME).
LoggingProjectSinkLogSinkExclusion
One entry in the exclusions list. Log entries matching filter are dropped before being routed to the sink's destination. name must 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 (no DOUBLE / 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 from GoogleLoggingMetric.valueExtractor.