Skip to content

Conversation

@dobrac
Copy link
Contributor

@dobrac dobrac commented Jan 13, 2026

Replace hardcoded mostUsedTemplates map with a dynamic LaunchDarkly flag (tracked-templates-for-metrics) that allows configuring which templates are tracked for sandbox start time metrics at runtime.


Note

Introduces a LaunchDarkly JSON flag to control which templates are tracked in sandbox start-time metrics and updates metric selection logic.

  • Adds TrackedTemplatesForMetrics flag and GetTrackedTemplatesSet helper in feature-flags/flags.go with sensible defaults
  • Updates setTemplateNameMetric in sandbox_create.go to consult the flag (checks templateID first, then aliases) and fall back to other; removes hardcoded map
  • Adjusts handler to pass context and feature flag client into metric-setting function

Written by Cursor Bugbot for commit acf1f06. This will update automatically on new commits. Configure here.

Replace hardcoded mostUsedTemplates map with a dynamic LaunchDarkly flag
(tracked-templates-for-metrics) that allows configuring which templates
are tracked for sandbox start time metrics at runtime.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@dobrac dobrac added the improvement Improvement for current functionality label Jan 13, 2026
dobrac and others added 2 commits January 13, 2026 16:50
Change the LaunchDarkly flag format from JSON array to JSON object
for easier configuration: {"base": true, "code-interpreter-v1": true, ...}

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Allow disabling specific templates by setting their value to false
in the tracked-templates-for-metrics flag.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@dobrac dobrac marked this pull request as ready for review January 13, 2026 15:57
dobrac and others added 2 commits January 13, 2026 17:00
Add template ID check in addition to aliases, allowing templates
to be tracked by their ID in the LaunchDarkly flag.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@dobrac dobrac enabled auto-merge (squash) January 13, 2026 16:07
@dobrac dobrac merged commit 65fded1 into main Jan 13, 2026
29 checks passed
@dobrac dobrac deleted the dobrac/ld-template-metrics-flag branch January 13, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement for current functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants