Skip to main content
There are scenarios where adjusting the observability level of your tracing is necessary. For example, you might want to prevent sensitive data from being logged for security purposes, or you might aim to reduce the payload size by limiting the size of base64 encoded images logged. The traceAI Specification provides a set of environment variables that you can configure to meet your observability requirements. Additionally, the traceAI auto-instrumentors allow you to specify a trace configuration directly in your code, eliminating the need to set environment variables if you prefer. The available settings include: To configure these settings, you can:
  1. Set the environment variables as outlined above
  2. Define the configuration within your code as demonstrated below
  3. Opt for the default values by taking no action
You can use a combination of these methods, with the following order of precedence:
  1. Values defined in the TraceConfig within your code
  2. Environment variables
  3. Default values
Below is an example of how to configure these settings in code using our OpenAI Python instrumentor. This configuration is applicable to all of our auto-instrumentors.