Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 4, 2025

Addresses feedback on inconsistent baggageScope.dispose() pattern in the OpenAI Agent sample. The Devin sample calls dispose() after run() completes (not in a finally block), while this sample was wrapping the entire operation in try-finally.

Changes

  • Removed try-finally wrapper around baggageScope.run() in nodejs/openai/sample-agent/src/agent.ts
  • Call dispose() after run() completes, matching the Devin sample pattern
// Before
try {
  await baggageScope.run(async () => { ... });
} finally {
  baggageScope.dispose();
}

// After
await baggageScope.run(async () => { ... });
baggageScope.dispose();

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: fpfp100 <126631706+fpfp100@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP address feedback on auto instrument configuration Align baggageScope.dispose() pattern with Devin sample Dec 4, 2025
Copilot AI requested a review from fpfp100 December 4, 2025 23:30
Base automatically changed from users/pefan/openaisamplefix to main December 8, 2025 17:36
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.

3 participants