Skip to content

feat(a365): add InvokeAgent GenAI parameters - #239

Merged
Nikhil Navakiran (nikhilNava) merged 4 commits into
mainfrom
feature/a365-invoke-agent-parameters
Sep 16, 2026
Merged

Nikhil Navakiran (nikhilNava) merged 4 commits into
mainfrom
feature/a365-invoke-agent-parameters

Conversation

@nikhilNava

@nikhilNava Nikhil Navakiran (nikhilNava) commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add reusable GenAI request and response parameter contracts for InvokeAgent scopes
  • emit current OpenTelemetry GenAI request, response, cache-write token, and provider attributes
  • accept structured system-instruction parts and serialize them safely for span attributes
  • propagate provider identity consistently across manual A365 scopes

Validation

  • npm run build
  • npm run format
  • npm run lint (existing warnings only)
  • npm run test:unit (1,100 passed, 5 existing todos, 1 skipped file)
  • npm run test:functional (31 passed)
  • npm run test:esm-build

Parity with microsoft/opentelemetry-distro-dotnet#120, with attribute names and structured content aligned to the current OpenTelemetry GenAI semantic conventions. ETW logger changes are out of scope.

nikhilc-microsoft and others added 3 commits September 14, 2026 06:42
Co-authored-by: Copilot <[email protected]>

Copilot-Session: 9ccc29b9-bf5d-4725-be3b-c4276b233c4c
Co-authored-by: Copilot <[email protected]>

Copilot-Session: 9ccc29b9-bf5d-4725-be3b-c4276b233c4c

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.

🟢 Approval recommended

All changes are reviewed; only a non-blocking JSDoc nit remains.

Pull request overview

Adds reusable GenAI contracts and OpenTelemetry v1.42 attribute emission for manual A365 InvokeAgent telemetry.

Changes:

  • Added GenAI request/response contracts and public exports.
  • Added request, response, cache-token, and provider attributes.
  • Added tests, documentation, and changelog coverage.
File summaries
File Summary
test/internal/unit/a365/scopes.test.ts Tests attribute emission and provider behavior.
test/internal/unit/a365/invokeAgentGenAiParameters.test.ts Tests contracts and constants.
src/index.ts Exports new root-level types.
src/a365/scopes/OpenTelemetryScope.ts Propagates provider identity.
src/a365/scopes/InvokeAgentScope.ts Emits request/response attributes; add JSDoc for the public late-recording method.
src/a365/index.ts Exports new types.
src/a365/contracts.ts Defines GenAI parameter contracts.
src/a365/constants.ts Adds semantic-convention keys.
CHANGELOG.md Records the feature.
A365_DOCUMENTATION.md Documents the new API and attributes.
Review details

Suppressed comments (1)

src/a365/scopes/InvokeAgentScope.ts:142

  • This newly public API has no JSDoc, while the other public recording methods in this scope are documented. Add a brief description stating that it records late response and usage parameters so generated API documentation explains when callers should use it.
  public recordResponseParameters(responseParameters: GenAiResponseParameters): void {
    this.mapResponseParameters(responseParameters);
  }
  • Files reviewed: 10/10 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 9ccc29b9-bf5d-4725-be3b-c4276b233c4c
@nikhilNava
Nikhil Navakiran (nikhilNava) merged commit 7f35bb9 into main Sep 16, 2026
7 checks passed
@nikhilNava
Nikhil Navakiran (nikhilNava) deleted the feature/a365-invoke-agent-parameters branch September 16, 2026 21:22
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.

4 participants