LinkMesh

Search docs, blog and changelog

ENDE

Snippets · Destinations

Send to Google Cloud (Logging, Monitoring, Trace)

The googlecloud exporter writes logs to Cloud Logging, metrics to Cloud Monitoring and spans to Cloud Trace, using the credentials of the environment it runs in (a service account on GKE or Compute Engine, or GOOGLE_APPLICATION_CREDENTIALS elsewhere). resourcedetection adds the GCP resource attributes the exporter maps to monitored resources.

Signals
LogsMetricsTraces
Source
OTLP
Components
otlpbatchmemory_limiterresourcedetection
Destination
Google Cloud Observability

OpenTelemetry Collector

OpenTelemetry Collector YAML
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317

processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 25
  batch:
    timeout: 5s
  resourcedetection:
    detectors: [env, gcp]
    timeout: 2s
    override: false

exporters:
  googlecloud:
    # project is read from the environment's credentials when omitted.
    project: ${env:GOOGLE_CLOUD_PROJECT}
    log:
      default_log_name: otel
    sending_queue:
      enabled: true
      queue_size: 5000

service:
  pipelines:
    logs:
      receivers: [otlp]
      processors: [memory_limiter, resourcedetection, batch]
      exporters: [googlecloud]
    traces:
      receivers: [otlp]
      processors: [memory_limiter, resourcedetection, batch]
      exporters: [googlecloud]
    metrics:
      receivers: [otlp]
      processors: [memory_limiter, resourcedetection, batch]
      exporters: [googlecloud]

LinkMesh

LinkMesh has no built-in template for this job. Add it as a custom destination in raw mode, with googlecloud as the component type and this body - the same lines as under googlecloud in the collector config:

Custom destination body (googlecloud)
project: ${env:GOOGLE_CLOUD_PROJECT}
log:
  default_log_name: otel
sending_queue:
  enabled: true
  queue_size: 5000

How custom components are validated and rolled out: create a custom destination.

Download config.yamlValidated with otelcol-contrib v0.161.0 on 2026-10-26

Complete config files, each checked with the collector's own validate command (otelcol-contrib v0.161.0).

The gotcha

Without credentials the collector does not start at all. In our test, outside GCP and without GOOGLE_APPLICATION_CREDENTIALS, it exited with "failed to start \"googlecloud\" exporter: credentials: could not find default credentials" - every other pipeline on that collector stopped with it.

Manage this across a fleet

LinkMesh manages collector configuration across a fleet from one self-hosted control plane, so a change like this is made once rather than host by host. The first 25 Collectors are free after a no-card registration in the OpenSight Customer Portal (5 without one).

Doing this in LinkMesh: Create a custom source or destination