feat(examples): refresh Semantic Kernel example and GenAI event typing#306
feat(examples): refresh Semantic Kernel example and GenAI event typing#306sanjeed5 wants to merge 8 commits intofederated-sdk-release-candidatefrom
Conversation
…port domain Rewrites the Semantic Kernel example to match the style of other integration examples (ADK, PydanticAI). Uses the shared customer support domain with order/policy mock tools and demonstrates: - Single agent with tools and multi-turn session continuity (AgentThread) - Multi-agent handoff orchestration (triage -> order/policy specialists) - Streaming agent response via invoke() Replaces the old test-style structure with clean scenario functions, updates from gpt-3.5-turbo to gpt-4o-mini, and enables SK native OTel diagnostics alongside the OpenInference OpenAI instrumentor.
- Switch from agent.invoke() to agent.invoke_stream() for actual token-level streaming in scenario 3 - Add thread.delete() cleanup to streaming scenario for consistency with scenario 1
…antic kernel run Fix broken session dump code (api_key, project, resp.events), correct testing UI URL, add Context7 MCP and import-path debugging tips, add make generate to pre-PR step, note dual-instrumentation pattern.
Document that Semantic Kernel native OTel is supported by HoneyHive ingestion and keep OpenInference layering optional to avoid conflicting spans. Add a concise note to store deeper framework context in references/.
Prefer `gen_ai.operation.name` when classifying spans so GenAI-native instrumentors can report model, chain, and tool events more accurately.
|
Claude finished @sanjeed5's task in 1m 17s —— View job PR Review Complete
Summary: No blocking issues. The example rewrite is a big improvement (620→236 lines), the |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Overall ReviewGood changes overall. The example rewrite is a massive improvement — going from 620 lines of verbose test scaffolding to 236 focused lines covering three meaningful Semantic Kernel patterns (single agent + tools, handoff orchestration, streaming). The customer support domain is coherent and the code reads cleanly.
No backwards-compatibility concerns — this is purely additive, inserting a new priority level before the existing OpenInference check. Existing behavior is preserved for spans without SKILL.md updates are practical — Context7 MCP tip, API gotchas, import path debugging guidance, and URL corrections all look like hard-won lessons from the Semantic Kernel work. Good to codify these. No blocking issues found. See inline comments for minor suggestions. |
|
📚 Documentation preview built — Download artifact Review instructions & validation statusHow to Review
Validation Status
|
Enable Semantic Kernel diagnostics before import and layer OpenAIInstrumentor so the example keeps agent/orchestration spans while capturing rich model inputs and outputs in HoneyHive.
Hoist the GenAI operation mapping to a module-level constant, log unknown operation names before falling through, sync the Strands example with the required generated formatting, and document the tracing fix in the changelog so the PR's generated-code and changelog checks pass.
Clarify in the Semantic Kernel example docstring that OpenAIInstrumentor is used because the example uses OpenAIChatCompletion, and that other providers should use their matching OpenInference instrumentor when available.
Summary
gen_ai.operation.namefor GenAI-native spansTest plan