title | description | published |
---|---|---|
Log Export |
Export Chalk logs to other monitoring systems. |
true |
import { Attribute, AttributeTable } from '@/components/AttributeTable'
Chalk's online dashboard provides a simple way to view logs from resolver execution. However, you may wish to export these logs into other observability tools so that you can view your Chalk-related data alongside data from other systems you maintain.
Chalk can export your logs to a sink of your choosing. You can configure sinks for log export from your settings page. Exported logs will contain the following fields:
ISO8601 timestamp. The log line format version. Currently constant "1". The log message. Name of the logger, if relevant. The log level as a string: "INFO", "WARN", "ERROR", "DEBUG". Stack trace of the associated exception, if relevant. A trace id in OpenCensus format. Used for correlating logs corresponding to a single query. Chalk Project ID. Chalk Deployment ID. Can be used to understand log patterns as code evolves. Your commit SHA, if available for the deployment. "online" or "offline". The name of the resolver that produced this log line, if available. Environment name. Environment id. An array of the tags that were provided for the associated query. The id of the agent that made the request (a service token or Chalk user).Chalk provides an implementation of the standard Python Logger interface that supports emitting logs to the web UI and your metrics export sink. You can use this logger like this:
from chalk.clogging import chalk_logger
@online
def your_resolver(...):
chalk_logger.info("Hello world!")