Wire the Agent365 example onto the OpenTelemetry SDK surface - #531
Open
heyitsaamir wants to merge 18 commits into
Open
Wire the Agent365 example onto the OpenTelemetry SDK surface#531heyitsaamir wants to merge 18 commits into
heyitsaamir wants to merge 18 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8398c990-e5b5-41b6-8d04-0519128726c1
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8398c990-e5b5-41b6-8d04-0519128726c1
heyitsaamir
force-pushed
the
heyitsaamir-agent365-otel-example
branch
from
July 30, 2026 20:50
4509c93 to
c0e53fe
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8398c990-e5b5-41b6-8d04-0519128726c1
heyitsaamir
force-pushed
the
heyitsaamir-agent365-otel-example
branch
from
July 30, 2026 22:55
c0e53fe to
8051c45
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8398c990-e5b5-41b6-8d04-0519128726c1
heyitsaamir
force-pushed
the
heyitsaamir-agent365-otel-example
branch
from
July 30, 2026 23:05
8051c45 to
192f898
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8398c990-e5b5-41b6-8d04-0519128726c1
heyitsaamir
force-pushed
the
heyitsaamir-agent365-otel-example
branch
from
July 30, 2026 23:11
192f898 to
8272bb0
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8398c990-e5b5-41b6-8d04-0519128726c1
heyitsaamir
force-pushed
the
heyitsaamir-agent365-otel-example
branch
from
July 30, 2026 23:59
8272bb0 to
7d219fa
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8398c990-e5b5-41b6-8d04-0519128726c1
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0d367487-e88d-4423-8016-475637d47ed0
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0d367487-e88d-4423-8016-475637d47ed0
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0d367487-e88d-4423-8016-475637d47ed0
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0d367487-e88d-4423-8016-475637d47ed0
Build the Agent365 baggage bridge on the public token-provider layer. Establish identifier-only inbound baggage before the root turn span, support explicit opt-out and granular personal-data includes, and expose reusable proactive scopes without configuring exporters.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: 0d367487-e88d-4423-8016-475637d47ed0
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 685066a8-363d-4fd6-b7a4-3a650db7b2cd
heyitsaamir
force-pushed
the
heyitsaamir-agent365-otel-example
branch
from
July 31, 2026 00:04
7d219fa to
4ed8f5d
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0d367487-e88d-4423-8016-475637d47ed0
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0d367487-e88d-4423-8016-475637d47ed0
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 685066a8-363d-4fd6-b7a4-3a650db7b2cd
Base automatically changed from
heyitsaamir-python-otel-docs
to
feature_agent365_support
July 31, 2026 04:02
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 685066a8-363d-4fd6-b7a4-3a650db7b2cd
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 685066a8-363d-4fd6-b7a4-3a650db7b2cd
corinagum
reviewed
Jul 31, 2026
| await _handle_message(ctx) | ||
| return | ||
|
|
||
| await token_cache.refresh( |
Contributor
There was a problem hiding this comment.
this runs before _handle_message, so should failed oauth be logged so message handling can continue without telemetry?
corinagum
approved these changes
Jul 31, 2026
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.
Summary
This is the top layer of the Python Agent365 OpenTelemetry stack, building on the automatic baggage bridge in #516 and the token-provider surface in #530. It makes those SDK seams runnable in the Agent365 example and mirrors the app-owned integration demonstrated by microsoft/teams.ts#679.
Decisions
microsoft-opentelemetryis declared only byexamples/agent365; no SDK package imports it or acquires an exporter dependency. The lockfile change is comparatively large because Microsoft OTel 1.3.6 brings its supported Azure Monitor, OTLP, web-framework, HTTP, logging, and OpenAI instrumentation set transitively into the example environment.app.token_providerbefore opening each Agent365 operation scope, then serves it from a synchronous in-memory resolver. This keeps credential ownership on the existing SDK token surface without blocking inside the exporter callback.InvokeAgentScopeis created without input or output content. The unusedopenai_agentsinstrumentation is explicitly disabled rather than adding an Agents SDK dependency.Deferred
SDK token and baggage behavior stays in the lower stack layers (#530 and #516); this PR intentionally contains only the runnable example, its app-level dependency/configuration, documentation, and generated lockfile.