Package dev.braintrust.config
Class BraintrustConfig
java.lang.Object
dev.braintrust.config.BraintrustConfig
Configuration for Braintrust SDK with sane defaults.
Most SDK users will want to use envars to configure all Braintrust settings.
However, it's also possible to override any envar during config construction.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionapiKey()apiUrl()appUrl()Whentrue(the default), the Braintrust span processor automatically extracts base64 data-URI attachments from LLM conversation spans, uploads them to object storage, and replaces the inline data with a lightweight reference.static BraintrustConfig.Builderbuilder()protected booleanprotected <T> Tcompress otel data before exporting to braintrustbooleandebug()CORS origins to allow when running remote eval devserverbooleanbooleanDeprecated.static BraintrustConfigThe parent attribute tells braintrust where to send otel data
The otel ingestion endpoint looks for (a) braintrust.parent = project_id|project_name|experiment_id:value otel attribute and routes accordingly
(b) if a span has no parent marked explicitly, it will look to see if there's an x-bt-parent http header (with the same format marked above e.g.protected <T> Tprotected <T> Tprotected StringgetEnvValue(String settingName) protected StringgetRequiredConfig(String settingName) protected <T> TgetRequiredConfig(String settingName, Class<T> settingClass) inthashCode()logsPath()static BraintrustConfigCustom SSL context for OTLP exporter.Custom X509 trust manager for OTLP exporter.
-
Field Details
-
envOverrides
-
-
Method Details
-
fromEnvironment
-
apiKey
-
of
-
getBraintrustParentValue
The parent attribute tells braintrust where to send otel data
The otel ingestion endpoint looks for (a) braintrust.parent = project_id|project_name|experiment_id:value otel attribute and routes accordingly
(b) if a span has no parent marked explicitly, it will look to see if there's an x-bt-parent http header (with the same format marked above e.g. project_name:andrew) that parent will apply to all spans in a request that don't have one
If neither (a) nor (b) exists, the data is dropped -
fetchProjectURI
Deprecated.Deprecated. Please useBraintrust.projectUri()instead -
builder
-
apiUrl
-
appUrl
-
tracesPath
-
logsPath
-
defaultProjectId
-
defaultProjectName
-
enableTraceConsoleLog
public boolean enableTraceConsoleLog() -
debug
public boolean debug() -
requestTimeout
-
filterAISpans
-
compressOtelPayload
compress otel data before exporting to braintrust -
autoConvertAIAttachments
Whentrue(the default), the Braintrust span processor automatically extracts base64 data-URI attachments from LLM conversation spans, uploads them to object storage, and replaces the inline data with a lightweight reference. This reduces the size of spans exported to Braintrust. -
sslContext
Custom SSL context for OTLP exporter. Builder-only field, not backed by envars. -
x509TrustManager
Custom X509 trust manager for OTLP exporter. Builder-only field, not backed by envars. -
devserverCorsOriginWhitelistCsv
CORS origins to allow when running remote eval devserver -
getConfig
-
getConfig
-
getRequiredConfig
-
getRequiredConfig
-
cast
-
getEnvValue
-
equals
-
canEqual
-
hashCode
public int hashCode()
-