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

Add tag definition #708

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Abstractions/Activities/Processing/ActivityTagKeys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ public static class ActivityTagKeys
/// </summary>
public static string Result { get; } = "Result";

/// <summary>
/// Health Check result tag key
/// </summary>
public static string HealthCheckResult { get; } = "HealthCheckResult";

/// <summary>
/// Activity sub type tag key
/// </summary>
Expand All @@ -22,5 +27,7 @@ public static class ActivityTagKeys
/// Activity metadata tag key
/// </summary>
public static string Metadata { get; } = "MetaData";


andrei5090 marked this conversation as resolved.
Show resolved Hide resolved
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Microsoft.Extensions.Logging;
using Microsoft.Omex.Extensions.Abstractions;
using Microsoft.Omex.Extensions.Abstractions.Activities;
using Microsoft.Omex.Extensions.Abstractions.Activities.Processing;

namespace Microsoft.Omex.Extensions.Diagnostics.HealthChecks.Composables;

Expand Down Expand Up @@ -59,7 +60,7 @@ public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context

try
{
activity?.SetTag("HealthCheckResult", result.Status.ToString());
activity?.SetTag(ActivityTagKeys.HealthCheckResult, result.Status.ToString());
andrei5090 marked this conversation as resolved.
Show resolved Hide resolved
}
catch (Exception ex)
{
Expand Down
Loading