Draft
Add telemetry support for HTTP request performance monitoring#90
Conversation
…toring - Add TelemetryData and HttpRequestTelemetry data models for tracking HTTP request metrics - Add ITelemetryCollector interface and InMemoryTelemetryCollector default implementation - Add ITelemetryProvider interface for custom telemetry provider extensibility - Add TelemetryOptions for configuring telemetry behavior (console output, custom providers) - Add SpectreConsoleTelemetryReporter for rendering performance summary tables - Add ReportTelemetrySummaryStep pipeline step for end-of-run telemetry reporting - Add TeaPieTelemetryExtensions with EnableTelemetry() extension methods for tp scripting API - Integrate telemetry collection into ExecuteRequestStep (HTTP duration, status, retries) - Register telemetry services in DI Setup.cs - Wire telemetry reporting step into default pipeline - Add 28 unit tests covering TelemetryData, InMemoryTelemetryCollector, HttpRequestTelemetry, and ReportTelemetrySummaryStep Co-authored-by: Burgyn <5930822+Burgyn@users.noreply.github.com> Agent-Logs-Url: https://github.com/Kros-sk/TeaPie/sessions/7d1128d9-d0d6-47ac-8409-dd00ac57f095
…vider errors - Change HttpRequestTelemetry.Timestamp default from DateTime.Now to DateTime.UtcNow - Properly await custom provider's OnRequestRecordedAsync with exception handling - Add test for custom provider failure resilience Co-authored-by: Burgyn <5930822+Burgyn@users.noreply.github.com> Agent-Logs-Url: https://github.com/Kros-sk/TeaPie/sessions/7d1128d9-d0d6-47ac-8409-dd00ac57f095
Copilot
AI
changed the title
[WIP] Add telemetry support for performance monitoring
Add telemetry support for HTTP request performance monitoring
Mar 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds structured performance telemetry collection for HTTP requests, retry operations, and collection execution. Telemetry is opt-in via the scripting API and renders a Spectre.Console performance summary at the end of a run.
Data model
HttpRequestTelemetry— per-request metrics (method, URL, status, duration, retry count)TelemetryData— aggregated stats with computed properties (success rate, throughput, fastest/slowest/most-retried)Collection & extensibility
ITelemetryCollector/InMemoryTelemetryCollector— singleton collector, no-ops when disabledITelemetryProvider— extension point for external systems (App Insights, OpenTelemetry, etc.)TelemetryOptions— toggle console output, plug in custom providersIntegration
ExecuteRequestStepwraps the resilience pipeline call with aStopwatchand records request telemetry including retry attempt countReportTelemetrySummaryStepadded to the default pipeline after test results reportingSetup.cs→AddTelemetry()Scripting API
Tests
29 new tests covering
TelemetryDataaggregation,InMemoryTelemetryCollectorenable/disable/recording/provider-failure resilience,HttpRequestTelemetrysuccess classification, andReportTelemetrySummaryStepconditional execution.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
example.com/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/TeaPie/TeaPie/tests/TeaPie.Tests/bin/Debug/net8.0/TeaPie.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/TeaPie/TeaPie/tests/TeaPie.Tests/bin/Debug/net8.0/TeaPie.Tests.deps.json /home/REDACTED/work/TeaPie/TeaPie/tests/TeaPie.Tests/bin/Debug/net8.0/testhost.dll --port 41577 --endpoint 127.0.0.1:041577 --role client --parentprocessid 4580 --telemetryoptedin false(dns block)/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/TeaPie/TeaPie/tests/TeaPie.Tests/bin/Debug/net8.0/TeaPie.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/TeaPie/TeaPie/tests/TeaPie.Tests/bin/Debug/net8.0/TeaPie.Tests.deps.json /home/REDACTED/work/TeaPie/TeaPie/tests/TeaPie.Tests/bin/Debug/net8.0/testhost.dll --port 44463 --endpoint 127.0.0.1:044463 --role client --parentprocessid 5471 --telemetryoptedin false(dns block)/usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/TeaPie/TeaPie/tests/TeaPie.Tests/bin/Debug/net8.0/TeaPie.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/TeaPie/TeaPie/tests/TeaPie.Tests/bin/Debug/net8.0/TeaPie.Tests.deps.json /home/REDACTED/work/TeaPie/TeaPie/tests/TeaPie.Tests/bin/Debug/net8.0/testhost.dll --port 45169 --endpoint 127.0.0.1:045169 --role client --parentprocessid 6522 --telemetryoptedin false(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 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.