feat(telemetry): support AGENTCORE_TELEMETRY_DISABLED env var - #12
Closed
Hweinstock wants to merge 7 commits into
Closed
feat(telemetry): support AGENTCORE_TELEMETRY_DISABLED env var#12Hweinstock wants to merge 7 commits into
Hweinstock wants to merge 7 commits into
Conversation
Hweinstock
commented
Sep 1, 2026
| @@ -0,0 +1,41 @@ | |||
| import { test, describe, afterEach, expect } from "bun:test"; | |||
OwnerAuthor
There was a problem hiding this comment.
remove these tests and replace them with some on the e2e config handler.
Hweinstock
commented
Sep 1, 2026
| const readOutput = await run(["telemetry.enabled"]); | ||
| expect(JSON.parse(readOutput)).toBe(false); | ||
| }); | ||
OwnerAuthor
There was a problem hiding this comment.
use a test.each and fix the failing tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spec
Problem: CI runs emit telemetry, adding noise on the
refactorbranch.Definition of Done:
AGENTCORE_TELEMETRY_DISABLED; when set to"true"or"1", telemetry is not emitted. Precedence: env var >> config >> default.Changes
src/globalConfig/config.tsx:applyOverridesnow givesAGENTCORE_TELEMETRY_DISABLEDtop precedence over config/default fortelemetry.enabled. Name matches mainline.telemetry.auditis untouched, so audit still works. Disable-only semantics (matches mainline)..github/workflows/build.yml,unit-test.yml: setenv: AGENTCORE_TELEMETRY_DISABLED: "1"at the reusable-workflow level. These are the only workflows that execute the CLI (agentcore --helpsmoke test) or tests (bun test). Set inside the reusable workflows because a caller'senv:does not propagate into reusable workflows.src/globalConfig/config.test.tsx: table-driven unit tests for the precedence and audit behavior.Verification
Unit / static checks
End-to-end (local OTLP collector + isolated HOME)
Minimal collector logs each
/v1/metricsexport to a file; the CLI points at it via configtelemetry.endpoint=http://localhost:4318, withenabledandauditbothtrue.Scenario 1 — no env var (baseline):
Scenario 2 —
AGENTCORE_TELEMETRY_DISABLED=1:Result: env var suppresses network telemetry with top precedence over config; audit is unaffected.
Reproduce