Skip to content

fix: restore BRAINTRUST_ENABLE_TRACE_CONSOLE_LOG support#67

Merged
Abhijeet Prasad (AbhiPrasad) merged 2 commits intomainfrom
matt/console-log
Apr 16, 2026
Merged

fix: restore BRAINTRUST_ENABLE_TRACE_CONSOLE_LOG support#67
Abhijeet Prasad (AbhiPrasad) merged 2 commits intomainfrom
matt/console-log

Conversation

@clutchski
Copy link
Copy Markdown
Contributor

Summary

  • Restores BRAINTRUST_ENABLE_TRACE_CONSOLE_LOG env var support that was lost during the v0.1 API migration (59f102a)
  • Adds EnableTraceConsoleLog field to config.Config, reads it from env in FromEnv(), and adds WithEnableTraceConsoleLog option
  • Wires the config value through client.go (was hardcoded to false) and renames trace.Config.EnableConsoleLog to EnableTraceConsoleLog for consistency

Test plan

  • Added assertions in TestFromEnv_Defaults (defaults to false)
  • Added assertions in TestFromEnv_LoadsEnvironmentVariables (reads env var)
  • make test passes
  • make lint passes (0 issues)
  • Verified manually: BRAINTRUST_ENABLE_TRACE_CONSOLE_LOG=true go run examples/internal/anthropic/main.go outputs span JSON to stdout

🤖 Generated with Claude Code

… migration

The v0.1 API migration (59f102a) deleted the old env.go which read this
env var, but the new config/config.go never re-added it. The trace layer
still had the implementation but client.go hardcoded it to false.

- Add EnableTraceConsoleLog field to config.Config
- Read BRAINTRUST_ENABLE_TRACE_CONSOLE_LOG env var in FromEnv()
- Add WithEnableTraceConsoleLog option
- Wire config value through client.go instead of hardcoding false
- Rename trace.Config.EnableConsoleLog to EnableTraceConsoleLog for consistency

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) merged commit 4e6142c into main Apr 16, 2026
9 checks passed
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) deleted the matt/console-log branch April 16, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants