Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Telemetry improvements for Plan and SKFunction #2180

Merged
merged 10 commits into from
Jul 26, 2023

Conversation

dmytrostruk
Copy link
Member

Motivation and Context

Based on PR: #2152.
Should fix: #2151

This PR contains changes to move telemetry logic from Plan class to separate class-decorator and add telemetry for SKFunction using decorator pattern.

Description

  1. Added interface IPlan which inherits from ISKFunction to decouple Plan and SKFunction instrumentation and future decorations.
  2. Implemented InstrumentedPlan with telemetry for InvokeAsync methods.
  3. Implemented InstrumentedSKFunction with telemetry for InvokeAsync methods.
  4. Added extension methods to create instrumented instances of plans and functions.
  5. Added additional counters for Plan/Function to measure number of total, successful and failed Plan/Function executions.

Contribution Checklist

@dmytrostruk dmytrostruk requested a review from a team as a code owner July 25, 2023 20:24
@shawncal shawncal added .NET Issue or Pull requests regarding .NET code kernel.core labels Jul 25, 2023
@dmytrostruk dmytrostruk added the PR: ready for review All feedback addressed, ready for reviews label Jul 25, 2023
shawncal
shawncal previously approved these changes Jul 26, 2023
dotnet/src/SemanticKernel/Planning/InstrumentedPlan.cs Outdated Show resolved Hide resolved
@shawncal shawncal added this pull request to the merge queue Jul 26, 2023
Merged via the queue into microsoft:main with commit 33f88a1 Jul 26, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code PR: ready for review All feedback addressed, ready for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request: Telemetry Instrumentation for Plan and SKFunction Entities
2 participants