Skip to content

feat(ai): change sensitiveRuntimeContext to telemetry.includeRuntimeContext and make it opt-in#14995

Merged
lgrammel merged 8 commits into
mainfrom
lg/jchRVL7A
May 5, 2026
Merged

feat(ai): change sensitiveRuntimeContext to telemetry.includeRuntimeContext and make it opt-in#14995
lgrammel merged 8 commits into
mainfrom
lg/jchRVL7A

Conversation

@lgrammel
Copy link
Copy Markdown
Collaborator

@lgrammel lgrammel commented May 5, 2026

Background

The sensitiveRuntimeContext for excluding runtime context properties from telemetry was introduced in #14757

However, it should be secure-by-default, ie runtime context properties should only be exposed to telemetry if they have been explicitly marked for that purpose.

Summary

  • move sensitiveRuntimeContext to telemetry.includeRuntimeContext
  • make it opt-in, i.e. runtime context properties have to be marked as true to be forwarded to telemetry

Manual Verification

Run examples and verify telemetry logging

  • examples/ai-functions/src/telemetry/console/tool-loop-agent-generate.ts
  • examples/ai-functions/src/telemetry/console/tool-loop-agent-stream.ts

Future Work

  • change the sensitive tool context in a similar way

Related Issues

Builds on #14757

@lgrammel lgrammel changed the title Lg/jch rvl7 a feat(ai): change sensitiveRuntimeContext to telemetry.includeRuntimeContext and make it opt-in May 5, 2026
@lgrammel lgrammel marked this pull request as ready for review May 5, 2026 07:50
@lgrammel lgrammel merged commit 6dd6b83 into main May 5, 2026
19 checks passed
@lgrammel lgrammel deleted the lg/jchRVL7A branch May 5, 2026 07:58
lgrammel added a commit that referenced this pull request May 5, 2026
…xt and make it opt-in (#14996)

## Background

The sensitiveContext tool option for excluding tool context properties
from telemetry was introduced in #14777

However, it should be secure-by-default, ie runtime context properties
should only be exposed to telemetry if they have been explicitly marked
for that purpose.

## Summary

* move `sensitiveContext` from `Tool` to `telemetry.includeToolsContext`
* make it opt-in, i.e. tools context properties have to be marked as
`true` to be forwarded to telemetry

## Manual Verification

Run examples and verify telemetry logging

- [x]
`examples/ai-functions/src/telemetry/console/tool-loop-agent-generate.ts`
- [x]
`examples/ai-functions/src/telemetry/console/tool-loop-agent-stream.ts`

## Related Issues

Builds on #14777 
Follow up from #14995
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.

2 participants