Observability - openlit.init()

Below is a detailed overview of the configuration options available, allowing you to adjust OpenLIT’s behavior and functionality to align with your specific observability needs:

ArgumentDescriptionDefault ValueRequired
environmentThe deployment environment of the application."default"Yes
application_nameIdentifies the name of your application."default"Yes
tracerAn instance of OpenTelemetry Tracer for tracing operations.NoneNo
meterAn OpenTelemetry Metrics instance for capturing metrics.NoneNo
otlp_endpointSpecifies the OTLP endpoint for transmitting telemetry data.NoneNo
otlp_headersDefines headers for the OTLP exporter, useful for backends requiring authentication.NoneNo
disable_batchA flag to disable batch span processing, favoring immediate dispatch.FalseNo
trace_contentEnables tracing of content for deeper insights.TrueNo
disabled_instrumentorsList of instrumentors to disable.NoneNo
disable_metricsIf set, disables the collection of metrics.FalseNo
pricing_jsonURL or file path of the pricing JSON file.https://github.com/openlit/openlit/blob/main/assets/pricing.jsonNo
collect_gpu_statsFlag to enable or disable GPU metrics collection.FalseNo

Prompt Hub - openlit.get_prompt()

Below are the parameters for use with the SDK for OpenLIT Prompt Hub for prompt management:

ParameterDescription
urlSets the OpenLIT URL. Defaults to the OPENLIT_URL environment variable.
api_keySets the OpenLIT API Key. Can also be provided via the OPENLIT_API_KEY environment variable.
nameSets the name to fetch a unique prompt. Use this or prompt_id.
prompt_idSets the ID to fetch a unique prompt. Use this or name. Optional
versionSet to True to get the prompt with variable substitution.. Optional
shouldCompileBoolean value that compiles the prompt using the provided variables. Optional
variablesSets the variables for prompt compilation. Optional
meta_propertiesSets the meta-properties for storing in the prompt’s access history metadata. Optional

Vault - openlit.get_secrets()

Below are the parameters for use with the SDK for OpenLIT Vault for secret management:

ParameterDescription
urlSets the Openlit URL. Defaults to the OPENLIT_URL environment variable.
api_keySets the OpenLIT API Key. Can also be provided via the OPENLIT_API_KEY environment variable.
keySets the key to fetch a specific secret. Optional
should_set_envBoolean value that sets all the secrets as environment variables for the application. Optional
tagsSets the tags for fetching only the secrets that have the mentioned tags assigned. Optional