Skip to main content
The OpenInference Specification defines a set of environment variables you can configure to suit your observability needs. In addition, the OpenInference auto-instrumentors accept a trace config which allows you to set these value in code without having to set environment variables, if that’s what you prefer The possible settings are: Note: OPENINFERENCE_HIDE_LLM_TOOLS is also applied when OPENINFERENCE_HIDE_INPUTS is enabled, consistent with how OPENINFERENCE_HIDE_INPUT_MESSAGES and OPENINFERENCE_HIDE_LLM_PROMPTS behave. To set up this configuration you can either:
  • Set environment variables as specified above
  • Define the configuration in code as shown below
  • Do nothing and fall back to the default values
  • Use a combination of the three, the order of precedence is:
    • Values set in the TraceConfig in code
    • Environment variables
    • default values
Below is an example of how to set these values in code using our OpenAI Python and JavaScript instrumentors, however, the config is respected by all of our auto-instrumentors.