mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
* Checkpoint * Checkpoint * Stable * Strategies * Updated * Encoding * Formatting * Cleanup * Formatting * Tests * Tuning * Update tests * Test update * Remove working solution * Add sample to solution * Sample readyme * Experimental * Format * Formatting * Encoding * Support IChatReducer * Sample output formatting * Initial plan * Replace CompactingChatClient with MessageCompactionContextProvider Co-authored-by: crickman <66376200+crickman@users.noreply.github.com> * Boundary condition * Fix encoding * Fix cast * Test coverage * Namespace * Improvements * Efficiency * Cleanup * Detect service managed conversation * Fix namespace * Fix merge * Fix test expectation * Update dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryChatHistoryProvider.cs Co-authored-by: westey <164392973+westey-m@users.noreply.github.com> * Address PR comments (x1) * Update comment * Update comments * Clean-up * Format output * Sync sample comment * Fix condition * Adjust data-flow * Address comments (x2) * Direct compaction * Fix summarization content * Argument check / fix count calculation * Minor follow-up * Diagnostics * Minor updates * Fix state test * Fix sliding window perf * Stable state keys * Increase size computation * Formatting * Add README.md for Agent_Step18_CompactionPipeline sample (#4574) * Sample comments * Updated * Update dotnet/src/Microsoft.Agents.AI/Compaction/MessageIndex.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionProviderTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/src/Microsoft.Agents.AI/Compaction/MessageIndex.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Address copilot comments * Fix namespace * Comments / convensions * Prefix `MessageGroup` and `MessageIndex` * Fix sliding window * Update dotnet/src/Microsoft.Agents.AI/Compaction/SummarizationCompactionStrategy.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryChatHistoryProvider.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Python alignment * Fix merge * Fix equality, readme, and sample * Readme update and ToolResult fix * Update dotnet/src/Microsoft.Agents.AI/Compaction/SummarizationCompactionStrategy.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Simplify readme * Update dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Remove example * Remove unused --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: westey <164392973+westey-m@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
46 lines
1.8 KiB
C#
46 lines
1.8 KiB
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System.Diagnostics;
|
|
|
|
namespace Microsoft.Agents.AI.Compaction;
|
|
|
|
/// <summary>
|
|
/// Provides shared telemetry infrastructure for compaction operations.
|
|
/// </summary>
|
|
internal static class CompactionTelemetry
|
|
{
|
|
/// <summary>
|
|
/// The <see cref="ActivitySource"/> used to create activities for compaction operations.
|
|
/// </summary>
|
|
public static readonly ActivitySource ActivitySource = new(OpenTelemetryConsts.DefaultSourceName);
|
|
|
|
/// <summary>
|
|
/// Activity names used by compaction tracing.
|
|
/// </summary>
|
|
public static class ActivityNames
|
|
{
|
|
public const string Compact = "compaction.compact";
|
|
public const string CompactionProviderInvoke = "compaction.provider.invoke";
|
|
public const string Summarize = "compaction.summarize";
|
|
}
|
|
|
|
/// <summary>
|
|
/// Tag names used on compaction activities.
|
|
/// </summary>
|
|
public static class Tags
|
|
{
|
|
public const string Strategy = "compaction.strategy";
|
|
public const string Triggered = "compaction.triggered";
|
|
public const string Compacted = "compaction.compacted";
|
|
public const string BeforeTokens = "compaction.before.tokens";
|
|
public const string AfterTokens = "compaction.after.tokens";
|
|
public const string BeforeMessages = "compaction.before.messages";
|
|
public const string AfterMessages = "compaction.after.messages";
|
|
public const string BeforeGroups = "compaction.before.groups";
|
|
public const string AfterGroups = "compaction.after.groups";
|
|
public const string DurationMs = "compaction.duration_ms";
|
|
public const string GroupsSummarized = "compaction.groups_summarized";
|
|
public const string SummaryLength = "compaction.summary_length";
|
|
}
|
|
}
|