Skip to content

Python: OpenTelemetry span missing after upgrading to Semantic Kernel 1.7 (Google IChatClient) #13482

@rogerbarreto

Description

@rogerbarreto

Description

After upgrading to Semantic Kernel 1.7.x and using the official Google IChatClient, OpenTelemetry traces no longer include the chat completion / chat generation span.
Chat completions execute correctly at runtime, but the corresponding telemetry span is missing.

This appears to be a regression introduced in SK 1.7, as chat generation telemetry was emitted correctly in earlier versions.


Expected behavior

OpenTelemetry traces include a span for:

  • Chat completion / chat generation

Other telemetry previously emitted remains unchanged.


Actual behavior

  • Chat completions function correctly
  • Tool invocation telemetry is present
  • Agent output / workflow telemetry is present
  • Chat completion (chat generation) span is missing from traces

Environment

  • Semantic Kernel version: 1.7.x
  • Chat client: Google official IChatClient
  • Telemetry: OpenTelemetry enabled
  • Language: .NET (can confirm Python if relevant)

Additional context

  • Discussed during AutoGen & Semantic Kernel Office Hours
  • Issue appears specific to the Google IChatClient path
  • Likely related to missing or changed instrumentation / adapter wrapping for chat completion spans in SK 1.7
  • No special OpenTelemetry configuration changes were made during the upgrade
  • No known workaround at this time

Metadata

Metadata

Assignees

Labels

.NETIssue or Pull requests regarding .NET code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions