Skip to content

Remove JSON configuration support from distro - #49

Merged
Hector Hernandez (hectorhdzg) merged 3 commits into
microsoft:mainfrom
hectorhdzg:fix/remove-json-config-support
Apr 23, 2026
Merged

Hector Hernandez (hectorhdzg) merged 3 commits into
microsoft:mainfrom
hectorhdzg:fix/remove-json-config-support

Conversation

@hectorhdzg

@hectorhdzg Hector Hernandez (hectorhdzg) commented Apr 23, 2026 •

Copy link
Copy Markdown
Member

Stop reading applicationinsights.json and remove JsonConfig from shared and A365 configuration flows.\n\nUpdate tests to reflect programmatic/env-only precedence, remove obsolete JsonConfig tests/snippets, and document the breaking change in the changelog.

Fixes #46

Stop reading applicationinsights.json and remove JsonConfig from shared and A365 configuration flows.\n\nUpdate tests to reflect programmatic/env-only precedence, remove obsolete JsonConfig tests/snippets, and document the breaking change in the changelog.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes legacy JSON-based configuration (applicationinsights.json and related env vars) from the distro’s configuration resolution, leaving configuration to be sourced only from programmatic options and environment variables, and updates tests/docs accordingly.

Changes:

  • Removed JsonConfig implementation and all JSON-config merge paths from shared and A365 configuration flows.
  • Updated unit/snippet tests to drop JSON config scenarios and reflect programmatic/env-only precedence.
  • Documented the breaking change and related startup-noise fix in the changelog.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/snippets.spec.ts Removes README snippet test that referenced JSON config file env var.
test/internal/unit/shared/jsonConfig.test.ts Deletes unit tests for JsonConfig.
test/internal/unit/shared/config.test.ts Reworks config merging tests to be programmatic/env-only; adjusts option shapes to azureMonitor.*.
test/internal/unit/a365/a365Configuration.test.ts Removes JSON config precedence tests for A365 configuration.
src/shared/jsonConfig.ts Deletes the JSON config loader implementation.
src/shared/config.ts Removes JSON config merge step; keeps env overrides as highest precedence.
src/a365/configuration/A365Configuration.ts Removes JSON-config application; updates precedence docs and logic accordingly.
CHANGELOG.md Notes breaking removal of JSON config support and startup-noise reduction.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/internal/unit/shared/config.test.ts Outdated
@hectorhdzg
Hector Hernandez (hectorhdzg) merged commit 96f4b86 into microsoft:main Apr 23, 2026
5 checks passed
Hector Hernandez (hectorhdzg) added a commit that referenced this pull request Apr 24, 2026
…AI instrumentation interfaces and expand A365 config support (#44)

* docs: expand A365 migration and configuration guidance

- document console exporter enablement and behavior\n- clarify instrumentation enable/disable patterns\n- align OpenAI/LangChain instrumentation interfaces with InstrumentationConfig\n- refresh GenAI samples with explicit enabled flags

* style: apply prettier formatting

* feat: wire all configuration options into runtime behavior; unify GenAI instrumentation interfaces and expand A365 config support

- Wire GenAI instrumentation configs (openaiAgents, langchain) into distro initialization with lifecycle cleanup
- Connect A365 configuration to runtime: pass authScopes to token resolver, auto-register hosting middleware
- Wire tracerName/tracerVersion into OpenAI tracer initialization
- Expand A365 migration guide and README with comprehensive configuration examples
- Unify GenAI instrumentation interfaces to extend InstrumentationConfig like other instrumentations
- Eliminate configuration no-ops by ensuring all options drive actual runtime behavior

Closes: #44

* fix: import OpenAIAgentsInstrumentationConfig from types to include tracerName/tracerVersion

The local interface definition in openAIAgentsTraceInstrumentor.ts was
shadowing the actual type from src/types.ts which includes tracerName
and tracerVersion properties. This caused TypeScript compilation errors.

Import the type from src/types.ts and remove the incomplete local definition.

* fix: remove unused InstrumentationConfig import

The import was leftover from removing the local interface definition.
OpenAIAgentsInstrumentationConfig is imported from src/types.js which
already extends InstrumentationConfig, so this import is unnecessary.

* Update

* Remove JSON configuration support from distro (#49)

* Remove JSON configuration support from distro

Stop reading applicationinsights.json and remove JsonConfig from shared and A365 configuration flows.\n\nUpdate tests to reflect programmatic/env-only precedence, remove obsolete JsonConfig tests/snippets, and document the breaking change in the changelog.

* Fix misleading config validation test assertion

* fix: resolve build errors, formatting issues for CI
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.

JsonConfig logs ENOENT + SyntaxError for missing applicationinsights.json on startup (v0.1.0-alpha.4)

3 participants