Destino Google Cloud Storage

Este producto no es compatible con el sitio Datadog seleccionado. ().

El destino Google Cloud Storage está disponible para la plantilla Logs de archivos. Utiliza este destino para enviar tus logs en formato rehidratable en Datadog a un bucket de Google Cloud Storage para archivarlos. Debes configurar logs de archivos de Datadog, si aún no lo has hecho y, a continuación, debes configurar el destino en la interfaz de usuario del pipeline.

Configurar archivos de logs

Si ya tienes un archivo de log de Datadog configurado para Observability Pipelines, ve directamente a Configurar el destino de tu pipeline.

Para configurar archivos de logs de Datadog necesitas tener instalada la integración Google Cloud Platform de Datadog.

Create a storage bucket

  1. Navigate to Google Cloud Storage.
  2. On the Buckets page, click Create to create a bucket for your archives..
  3. Enter a name for the bucket and choose where to store your data.
  4. Select Fine-grained in the Choose how to control access to objects section.
  5. Do not add a retention policy because the most recent data needs to be rewritten in some rare cases (typically a timeout case).
  6. Click Create.

Create a service account to allow Workers to write to the bucket

  1. Create a Google Cloud Storage service account.
    • Grant the Service Account permissions to your bucket with Storage Admin and Storage Object Admin permissions.
    • If you want to authenticate with a credentials file, download the service account key file and place it under DD_OP_DATA_DIR/config. You reference this file when you set up the Google Cloud Storage destination later on.
  2. Follow these instructions to create a service account key. Choose json for the key type.

Connect the storage bucket to Datadog Log Archives

  1. Navigate to Datadog Log Forwarding.
  2. Click New archive.
  3. Enter a descriptive archive name.
  4. Add a query that filters out all logs going through log pipelines so that none of those logs go into this archive. For example, add the query observability_pipelines_read_only_archive, assuming no logs going through the pipeline have that tag added.
  5. Select Google Cloud Storage.
  6. Select the service account your storage bucket is in.
  7. Select the project.
  8. Enter the name of the storage bucket you created earlier.
  9. Optionally, enter a path.
  10. Optionally, set permissions, add tags, and define the maximum scan size for rehydration. See Advanced settings for more information.
  11. Click Save.

See the Log Archives documentation for additional information.

Configurar el destino de tu pipeline

Configura el destino Amazon S3 y sus variables de entorno cuando configures un pipeline de logs de archivos. La siguiente información se configura en la interfaz de usuario del pipeline.

  1. Enter the name of your Google Cloud storage bucket. If you configured Log Archives, it’s the bucket you created earlier.
  2. If you have a credentials JSON file, enter the path to your credentials JSON file. If you configured Log Archives it’s the credentials you downloaded earlier. The credentials file must be placed under DD_OP_DATA_DIR/config. Alternatively, you can use the GOOGLE_APPLICATION_CREDENTIALS environment variable to provide the credential path.
  3. Select the storage class for the created objects.
  4. Select the access level of the created objects.
  5. Optionally, enter in the prefix.
    • Prefixes are useful for partitioning objects. For example, you can use a prefix as an object key to store objects under a particular directory. If using a prefix for this purpose, it must end in / to act as a directory path; a trailing / is not automatically added.
    • See template syntax if you want to route logs to different object keys based on specific fields in your logs.
    • Note: Datadog recommends that you start your prefixes with the directory name and without a lead slash (/). For example, app-logs/ or service-logs/.
  6. Optionally, click Add Header to add metadata.
  7. Optionally, toggle the switch to enable Buffering Options.
    Note: Buffering options is in Preview. Contact your account manager to request access.
    • If left disabled, the maximum size for buffering is 500 events.
    • If enabled:
      1. Select the buffer type you want to set (Memory or Disk).
      2. Enter the buffer size and select the unit.

Configurar las variables de entorno

There are no environment variables to configure.

Cómo funciona el destino

Colocación de eventos en lotes

Un lote de eventos se descarga cuando se cumple uno de estos parámetros. Para obtener más información, consulta la colocación de eventos en lotes.

Eventos máximosBytes máximosTiempo de espera (segundos)
Ninguno100,000,000900