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

Fix Npgsql Metrics #658

Merged
merged 3 commits into from
Nov 2, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Logging;
using Npgsql;
using OpenTelemetry.Metrics;

Check failure on line 12 in src/Components/Aspire.Npgsql/AspirePostgreSqlNpgsqlExtensions.cs

View check run for this annotation

Azure Pipelines / dotnet-aspire-pr (Build linux)

src/Components/Aspire.Npgsql/AspirePostgreSqlNpgsqlExtensions.cs#L12

src/Components/Aspire.Npgsql/AspirePostgreSqlNpgsqlExtensions.cs(12,1): error IDE0005: (NETCORE_ENGINEERING_TELEMETRY=Build) Using directive is unnecessary. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005)

Check failure on line 12 in src/Components/Aspire.Npgsql/AspirePostgreSqlNpgsqlExtensions.cs

View check run for this annotation

Azure Pipelines / dotnet-aspire-pr

src/Components/Aspire.Npgsql/AspirePostgreSqlNpgsqlExtensions.cs#L12

src/Components/Aspire.Npgsql/AspirePostgreSqlNpgsqlExtensions.cs(12,1): error IDE0005: (NETCORE_ENGINEERING_TELEMETRY=Build) Using directive is unnecessary. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005)

namespace Microsoft.Extensions.Hosting;

Expand Down Expand Up @@ -102,9 +102,6 @@
{
// https://github.com/npgsql/npgsql/blob/4c9921de2dfb48fb5a488787fc7422add3553f50/src/Npgsql/MetricsReporter.cs#L48
meterProviderBuilder.AddMeter("Npgsql");

// disable "prepared_ratio" until https://github.com/dotnet/aspire/issues/629 is fixed.
meterProviderBuilder.AddView(instrumentName: "db.client.commands.prepared_ratio", MetricStreamConfiguration.Drop);
});
}
}
Expand Down
Loading