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 that receives logs via a TLS-secured gRPC OTLP endpoint and forwards them to your preferred log provider.
OpenTelemetry is an industry-standard framework that simplifies integration with major log provider platforms, ensuring seamless implementation.
- Learn more about hosting an OpenTelemetry(OTEL) Collector service in the OpenTelemetry Documentation.
- Refer to Host a Launch OTEL Collector Service exporting logs to AWS Cloudwatch to configure OTEL Collector service.
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.
Note: Launch can forward up to 1000 logs in a single request.
This step-by-step guide lets you create Log Targets in Contentstack Launch to forward your project logs to specific endpoints.
Prerequisites
- Contentstack account
- Access to Launch for your organization
- 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:
- Log in to Contentstack and click the Launch icon from the left navigation panel.
- Click the Settings icon to enter the Log Targets page.
- Click the + New Log Target button to create a new Log Target.
- In the modal that appears, enter the following:
- Name: A name for the Log Target.
- Endpoint URL: An Open Telemetry GRPC endpoint where logs will be transmitted.
- Secret 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.
- 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:
- Click the Settings icon to enter the Log Targets page.
- Against the Log Target that you want to edit, click the ellipses under Actions, and then click Edit.
- Edit the Log Target details as required and then click the Update button to save the updated details.
Delete a Log Target
Follow the steps below to delete a Log Target:
- Click the Settings icon to enter the Log Targets page.
- Against the Log Target that you want to delete, click the ellipses under Actions, and then click Delete.
- In the modal that appears, click the Yes, Delete button to delete the Log Target.