The Log Target feature in Contentstack Launch enables you to forward logs generated by Launch-hosted SSR Applications, Cloud Functions, and Edge Functions to third-party monitoring services.
When you create a Log Target, you choose which type of logs to forward:
You can set up an OpenTelemetry Collector service to receive logs through a TLS-secured OTLP (OpenTelemetry Protocol) over gRPC/HTTP 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.
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/HTTP endpoint.
With this feature, you can integrate forwarded logs with external monitoring tools for real-time insights, alerts, and persistent log storage.
Note: Logs are forwarded exactly as generated by your application. We do not modify, filter, or mask log content. If your logs contain sensitive information, ensure it is masked or removed at the source before export.
This step-by-step guide lets you create Log Targets in Contentstack Launch to forward your project logs to specific endpoints.
To create a Log Target, log in to Contentstack account and follow the steps:



All Projects & Environments Log Target forwards its selected data types across all current and future environments.
Only one Log Target can forward each data type organization-wide. The valid setups are:

Uniqueness rule
Each environment and data type combination can be covered by only one Log Target. The same environment can send logs to multiple Log Targets, as long as each uses a different data type.
Examples:
Note: If existing Log Targets cover environments for a selected data type, the system disables the All Projects & Environments option for that data type when creating or editing a Log Target.
Note: The JSON option is only for HTTP. If you have selected gRPC as the protocol, the payload format is always Protobuf.



Follow the steps below to edit a Log Target:

Note: You can change the Data Type during editing. The change is subject to the same environment and data type uniqueness rule. If the selected data type is already covered by another Log Target, including All Projects & Environments Log Targets, the system blocks the change.

The Log Target is updated while in a disabled state.
To enable the Log Target, follow these steps:


The Log Target is now enabled and ready to forward logs to your provider.
To verify the Log Target and test the connection, follow these steps:

This confirms whether your Log Target is ready to receive logs.
Note: To verify the connection to your endpoint, Launch sends a test log that may be visible in your observability tool.
Follow the steps below to delete a Log Target:


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