Skip to content

Commit 3aef796

Browse files
committed
Optional assets category
1 parent 87bd4e8 commit 3aef796

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/DigmaSSEServer/DigmaClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ public async Task<string> GetTrace(string traceId)
106106
return await response.Content.ReadAsStringAsync();
107107
}
108108

109-
public async Task<string> GetAssetsByCategory(string environmentId, string? category = null, int page = 0, int pageSize = 10)
109+
public async Task<string> GetAssetsByCategory(string environmentId, string? category = "", int page = 0, int pageSize = 10)
110110
{
111111
var request = new
112112
{
113113
environmentId,
114-
category,
114+
category = string.IsNullOrEmpty(category) ? null : category,
115115
page,
116116
pageSize
117117
};

src/DigmaSSEServer/Tools/CodeObservabilityTool.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ public static async Task<string> GetTrace(DigmaClient client,
8787
"Find out what affects performance in the application the most. Returns a list of assets (can be code locations, endpoints, database queries etc.) and their performance impact, which is measured by the time cost of exeecuting these assets.")]
8888
public static async Task<string> GetTopPerformanceImpactingAssets(DigmaClient client,
8989
[Description("The environment id")] string environmentId,
90-
[Description("The asset category name")]
91-
string? assetCategory = null,
90+
[Description("The asset category name. Leave empty string for all categories")]
91+
string? assetCategory = "",
9292
[Description("Page number (zero-based)")]
9393
int page = 0,
9494
[Description("Number of items per page")]

0 commit comments

Comments
 (0)