cs-icon.svg

Log Targets

The Log Target feature in Contentstack Launch enables you to forward server and edge logs generated by Launch-hosted SSR websites, Cloud Functions, or Edge Functions to third-party monitoring services.

You can set up an OpenTelemetry Collector service to receive logs through a TLS-secured OTLP (OpenTelemetry Protocol) over gRPC endpoint and forward them to your preferred log provider.

OpenTelemetry is an industry-standard framework that simplifies integration with major log provider platforms, ensuring seamless implementation.

Additional Resource:

Tip: You do not need to host your own OpenTelemetry Collector service if your log aggregator platform already supports ingesting logs in OpenTelemetry format over a gRPC endpoint.

With this feature, the generated server and edge logs can be seamlessly integrated with external monitoring tools, providing insights, alerts, and persistent data storage for better management and analysis of log data.

This step-by-step guide lets you create Log Targets in Contentstack Launch to forward your project logs to specific endpoints.

Prerequisites

  1. Contentstack account
  2. Access to Launch for your organization
  3. OTEL Collector service capable of receiving logs configured with TLS-secured gRPC Endpoint

Steps for Execution

Create a Log Target

Follow the steps below to create a Log Target:

  1. Log in to Contentstack and click the Launch icon from the left navigation panel.
  2. Click the Settings icon to enter the Log Targets page. Launch_Log-Targets_LandingPageNew.png
  3. Click the + Create New Log Target button to create a new Log Target. Launch_Log-Targets_CreateNewLogTarget_New.png
  4. In the modal that appears, enter the following:
    1. Log Target Name: A name for the Log Target.
    2. Endpoint URL: An Open Telemetry OTLP/gRPC endpoint where logs will be transmitted.
    3. Authorization Type: Type of authorization.
    4. Token: A secret token is attached to the Log Target requests as an Auth Bearer Token header, this helps you to validate that the request is coming from the right source, i.e., a Log Target.
    Launch_Log-Targets_CreateNewLogTarget_Modal_New.png
  5. Click the Create Log Target button.

You will see that you have created a Log Target successfully to forward your project logs to the mentioned Endpoint URL.

Edit a Log Target

Follow the steps below to edit a Log Target:

  1. Click the Settings icon to enter the Log Targets page.
  2. Against the Log Target that you want to edit, click the ellipses under Actions, and then click EditLaunch_Log-Targets_EditLogTarget_New.png
  3. Edit the Log Target details as required and then click the Update button to save the updated details. Launch_Log-Targets_EditLogTargetModal_New.png

Delete a Log Target

Follow the steps below to delete a Log Target:

  1. Click the Settings icon to enter the Log Targets page.
  2. Against the Log Target that you want to delete, click the ellipses under Actions, and then click DeleteLaunch_Log-Targets_DeleteLogTarget_New.png
  3. In the modal that appears, click the Yes, Delete button to delete the Log Target. Launch_Log-Targets_DeleteLogTargetModal_New.png

Additional Resource: Use this GitHub repository as an example to set up a TLS-secured OTLP/gRPC endpoint that receives and exports logs to CloudWatch.

Limitation

  • Launch can forward only up to 1000 logs in a single request.
Was this article helpful?
^