Deployments
Log Plugins
Zuplo provides live logging for development environments out of the box as well as limited error logging in production. If you would like your logs to be sent to your own logging service, you can enable one of Zuplo's logging plugins. Currently, Zuplo supports logging to the following sources:
- AWS CloudWatch
- Datadog
- Dynatrace
- Google Cloud Logging
- Loki
- Sumo Logic
- VMWare Log Insight
If you would like to log to a different source, reach out to support@zuplo.com and we'd be happy to work with you to add a new logging plugin.
To configure you logging, you need to create a zuplo.runtime.ts
file in the
modules
. The examples below show the content of the file with each of the
different logging plugins.
Enterprise Feature
Logging Plugins is available as an add-on as part of an enterprise plan. If you would like to purchase this feature, please contact us at sales@zuplo.com or reach out to your account manager.
Most enterprise features can be used in a trial mode for a limited time. Feel free to use enterprise features for development and testing purposes.
Plugins#
Below you will find details on each logger.
AWS CloudWatch#
Datadog#
Dynatrace#
To setup Dynatrace logging, you'll need to set the URL to your Dynatrace instance's ingest API endpoint.
You'll need to create an API Token with events.ingest
scope.
Google Cloud Logging#
The Google Cloud Logging plugin enables pushing logs to your GCP project. See the document on this plugin for more information.
Loki#
The Loki plugin enables pushing logs to your Loki server. See the document on this plugin for more information.
Sumo Logic#
The Sumo Logic logger uses the HTTP Source to send logs. Create a hosted HTTP Collector and Set the HTTP Source Address valud to the url property on the plugin.
When creating the HTTP Collector, leave the default settings for parsing the logs.
VMWare Log Insight#
The VMWare Log Insight plugin enables pushing logs to your VMWare Log Insights via the REST API. See the document on this plugin for more information.
Log Fields#
Below is a list of the default fields that are sent with log messages. Do note,
that the names of these fields may differ depending on your logger as we follow
the conventions of each log service. So environmentType
may be
environmentType
, environment_type
, or environment-type
. See the specific
log plugin for details.
severity
: The log level of the message. Values aredebug
,info
,warn
,error
requestId
: The value of thezp-rid
header. This is used for tracing issues across Zuplo systems.atomicCounter
: This is a counter that indicates log ordering. Because of the shared nature of the edge environments the clock does not incriment unless an I/O operation is performed. As such, you may notice that you have several messages with the same timestamp. You can use the value of this counter to determine order. This value will be an integer between 0 and the max integer value. It will cycle back to 0 when the maximum is reached. This number is not persistent across restarts or shared across environments.environment
: This is the name of your Zuplo environment. This will be the same as your Zuplo subdomain. i.e. if your Zuplo URL ishttps://silver-lemming-main-b0cef33.zuplo.app
, the environment issilver-lemming-main-b0cef33
environmentType
: This indicates where your environment is running. Possible values are:edge
: Environments deployed to our 300+ edge locationsworking-copy
: Environments deployed to your single-instance dev serverlocal
: When running with Zuplo local development
environmentStage
: This indicates the deployment stage of your environment. Possible values are:production
: Environments deployed from your default git branchpreview
: Environments deployed from any other git branchworking-copy
: Environments deployed to your single-instance dev serverlocal
: When running with Zuplo local development
loggingId
: This string is a unique identifier that combines your environment name, branch name, and project name into one string. We advise against using this value and instead recommend using theenvironment
andenvironmentStage
values for filtering. This value will likely be deprecated in future releases.buildId
: A UUID representing the unique build of your API. This value changes every time a new version of your API is built and deployed.logSource
: Whether the log originated from Zuplo system code (system
) or from customer code (user
)requestRayId
: The value of the Cloudflare Ray ID. This value is used internally to coordinate log event in Zuplo to log events in Cloudflare. It is provided in your logs for potential troubleshooting. Normally, it is recommended to rely on therequestId
for tracing.