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

Removing prometheus-net dependency #1526

Merged
merged 4 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@ You should also be able to authenticate with the in-cluster service
account using the `InClusterConfig` function shown below.

## Monitoring
There is optional built-in metric generation for prometheus client metrics.
The exported metrics are:
Metrics are built in to HttpClient using System.Diagnostics.DiagnosticsSource.
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/built-in-metrics-system-net

* `k8s_dotnet_request_total` - Counter of request, broken down by HTTP Method
* `k8s_dotnet_response_code_total` - Counter of responses, broken down by HTTP Method and response code
* `k8s_request_latency_seconds` - Latency histograms broken down by method, api group, api version and resource kind

There is an example integrating these monitors in the examples/prometheus directory.
There are many ways these metrics can be consumed/exposed but that decision is up to the application, not KubernetesClient itself.
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/metrics-collection

## Sample Code

Expand Down
29 changes: 0 additions & 29 deletions examples/prometheus/Prometheus.cs

This file was deleted.

7 changes: 0 additions & 7 deletions examples/prometheus/prometheus.csproj

This file was deleted.

3 changes: 1 addition & 2 deletions src/KubernetesClient/KubernetesClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="prometheus-net" Version="8.2.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.1.2" />
<PackageReference Include="IdentityModel.OidcClient" Version="5.2.1" />
<PackageReference Include="Fractions" Version="7.3.0" />
Expand All @@ -22,4 +21,4 @@
OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>

</Project>
</Project>
55 changes: 0 additions & 55 deletions src/KubernetesClient/PrometheusHandler.cs

This file was deleted.

Loading