Repository navigation
feat: wire all configuration options into runtime behavior; unify GenAI instrumentation interfaces and expand A365 config support - #44
Merged
Hector Hernandez (hectorhdzg) merged 11 commits intoApr 24, 2026
Conversation
Hector Hernandez (hectorhdzg)
commented
Apr 23, 2026
Member
- 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
- 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
Hector Hernandez (hectorhdzg)
requested review from
Jackson Weber (JacksonWeber),
Nev (MSNev),
Leighton Chen (lzchen) and
Radhika Gupta (rads-1996)
as code owners
April 23, 2026 18:42
Copilot started reviewing on behalf of
Hector Hernandez (hectorhdzg)
April 23, 2026 18:42
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Expands and clarifies A365 migration and configuration guidance across public docs and samples, including console exporter behavior and updated GenAI instrumentation configuration shapes.
Changes:
- Update
InstrumentationOptionstypes to align GenAI configs withInstrumentationConfig-style shapes (enabled, etc.). - Refresh OpenAI/LangChain samples and README examples to use explicit
enabled: trueflags. - Expand README + A365 migration guidance around console exporters and instrumentation enable/disable patterns.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/types.ts |
Adjusts public types for GenAI instrumentation configs and their documented shape. |
samples/src/openaiInstrumentation.ts |
Updates sample config to use enabled: true for OpenAI Agents instrumentation options. |
samples/src/langchainInstrumentation.ts |
Updates sample config to use enabled: true for LangChain instrumentation options. |
README.md |
Adds/clarifies instrumentation enable/disable guidance and documents console exporter behavior. |
MIGRATION_A365.md |
Expands A365 option coverage and migration guidance (env vars, console exporters, hosting utilities). |
Comments suppressed due to low confidence (2)
samples/src/openaiInstrumentation.ts:29
- This sample configures
instrumentationOptions.openaiAgents.enabled, butuseMicrosoftOpenTelemetry()currently does not act oninstrumentationOptions.openaiAgents(the distro only creates HTTP/Azure SDK/DB/Azure Functions + log instrumentations). As a result, the comment "this call is automatically traced" is misleading—either add distro support to initialize the OpenAI Agents instrumentor when enabled, or update the sample to use the actual enablement API.
useMicrosoftOpenTelemetry({
azureMonitor: {
azureMonitorExporterOptions: {
connectionString:
process.env.APPLICATIONINSIGHTS_CONNECTION_STRING || "<your connection string>",
},
},
instrumentationOptions: {
openaiAgents: {
enabled: true,
isContentRecordingEnabled: true,
},
},
});
samples/src/langchainInstrumentation.ts:30
- This sample configures
instrumentationOptions.langchain.enabled, butuseMicrosoftOpenTelemetry()currently does not act oninstrumentationOptions.langchain, so the "automatically traced" behavior won’t occur. Either wire LangChain enablement into the distro when this flag is set, or update the sample to call the supported LangChain instrumentor API directly.
useMicrosoftOpenTelemetry({
azureMonitor: {
azureMonitorExporterOptions: {
connectionString:
process.env.APPLICATIONINSIGHTS_CONNECTION_STRING || "<your connection string>",
},
},
instrumentationOptions: {
langchain: {
enabled: true,
isContentRecordingEnabled: true,
},
},
});
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…AI 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: microsoft#44
…racerName/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.
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.
* 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
Radhika Gupta (rads-1996)
approved these changes
Apr 24, 2026
Hector Hernandez (hectorhdzg)
merged commit Apr 24, 2026
b397b1c
into
microsoft:main
5 checks passed
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 free
to 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.