Skip to content

Conversation

dineshkumarkummara
Copy link

Motivation and Context

Currently, Semantic Kernel does not ship an example of how to adopt the new OpenTelemetry GenAI semantic conventions.
This makes it difficult for developers to instrument SK-based applications with end-to-end observability (latency, token usage, error rates, tool-call spans, and retrieval latency).

This PR contributes a documentation/sample entry showing how to instrument SK with OpenTelemetry using the SkOtel library.
The goal is to provide the community with a ready-to-run reference that aligns with the OTel GenAI spec.


Description

  • Adds a docs page under samples/ demonstrating OTel GenAI instrumentation for SK.
  • Shows how to register AddSemanticKernelTelemetry middleware and a DelegatingHandler.
  • Provides runnable example (sk-chat) plus Dockerized Collector → Tempo → Prometheus → Grafana stack.
  • Includes screenshot of a Grafana token throughput panel to illustrate expected telemetry output.

This contribution is docs/sample only — no changes are made to SK core runtime code.


Contribution Checklist

  • The docs build clean without any errors or warnings
  • The sample code runs successfully and emits OTel telemetry
  • The PR follows the SK Contribution Guidelines
  • Screenshots and snippets are verified against the live repo example
  • This is a docs/sample addition — no breaking changes introduced

@dineshkumarkummara
Copy link
Author

@dineshkumarkummara please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree
@microsoft-github-policy-service agree

@dineshkumarkummara
Copy link
Author

Hi, this is a docs/sample contribution showing how to enable OpenTelemetry GenAI instrumentation in SK. All docs build locally. Looking forward to your feedback.

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.

1 participant