Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 4.38 KB

File metadata and controls

58 lines (42 loc) · 4.38 KB

Google Cloud Exporter Prerequisites

The Google Cloud Exporter supports Metrics, Logs, and Traces. This directory contains sub directories with usercase specific configurations, all of which are compatible with Google Cloud Monitoring.

Google Cloud APIs

Enable the following APIs.

  • Cloud Metrics
  • Cloud Logging
  • Cloud Tracing

To learn more about enabling APIs, see the documentation.

Authentication

The Google Cloud exporter supports three authentication mechanisms.

Google Application Default Credentials

When running within Google Cloud, instances with the correct scopes for monitoring, logging and tracing will have the ability to send telemetry to Google Cloud without further configuration. Simply define the Google Cloud exporter in your configuration.

exporters:
  googlecloud:

Credential File

A Google Cloud Service Account can used for authentication by creating a service account and key.

The credentials_file parameter can be set:

exporters:
  googlecloud:
    credentials_file: /opt/observiq-otel-collector/credentials.json

Credential JSON

Using a credential JSON is an alternative to credential file. Instead of placing the service account key file on the system, it is embedded into the config. The service account setup and credential file creation is idential to the Credential File option.

Setting the credentials parameter will override the credentials_file parameter.

The credentials parameter can be set by embedding the credential json:

exporters:
  googlecloud:
    # this is a fake credential json
    credentials: '{   "type": "service_account",   "project_id": "myproject",   "private_key_id": "bt47a39d576b495709711c0536348edb41baf7cb",   "private_key": "-----BEGIN PRIVATE KEY-----\nFIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDmjTOtSX18SBQw\nyIJ2Y9jpqXyBNeV4ghANRtckuc5bAnqAVsTaqGUD60zGpxa5mMSdPhFDRRw5Seeg\n8QR0TCZXDX3DaJ2pMeO8qiy5DyvllseS1vWjvabEdT0LLIB+dCbaqbVeaRRwOlFH\noqUQiND7WeVqu7m/d0USwjHIBoFZFg9j2Q23UBFPLJJ/7FwuZgiIYwzfJzFDXHG0\nK2JNSnksSjZ14wnXORU0GCRHMnAutoi1P5uZQPbaepQm+EwwZnRgcO54SQBRSGod\nK2iu81SprThEtQf5uGkO/0D1+b2A/81EJvPf1ye92Oi0z3ZebzBSX1c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W0yr5WpXn8EvPxi/QwnDTvSECod7FstFLfOS9AoGANBIZghBf8HwphoHEV6q1\n+OkiCJF7Daf16ZGm6HBbDUzd6prC/lNzGFJcY97uNQy4C6p3v/OJzibvQAHb68ap\nEtZ+7M1TJN8x78BmX2NwGoC0Yjg42gt0nvulRnTrSZvnr2vyjkexhQ0lwkeuMYE5\nQGfwz9DP01LHNFF2711tMWY=\n-----END PRIVATE KEY-----\n",   "client_email": "[email protected]",   "client_id": "006890467469331372107",   "auth_uri": "https://accounts.google.com/o/oauth2/auth",   "token_uri": "https://oauth2.googleapis.com/token",   "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",   "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/serviceaccount%40myproject.iam.gserviceaccount.com" }'