Skip to content

Commit 93140a6

Browse files
authored
Removing prometheus-net dependency (kubernetes-client#1526)
* Update README.md * Update KubernetesClient.csproj * Delete examples/prometheus directory * Delete src/KubernetesClient/PrometheusHandler.cs
1 parent c15d79d commit 93140a6

File tree

5 files changed

+5
-100
lines changed

5 files changed

+5
-100
lines changed

README.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,11 @@ You should also be able to authenticate with the in-cluster service
2626
account using the `InClusterConfig` function shown below.
2727

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

32-
* `k8s_dotnet_request_total` - Counter of request, broken down by HTTP Method
33-
* `k8s_dotnet_response_code_total` - Counter of responses, broken down by HTTP Method and response code
34-
* `k8s_request_latency_seconds` - Latency histograms broken down by method, api group, api version and resource kind
35-
36-
There is an example integrating these monitors in the examples/prometheus directory.
32+
There are many ways these metrics can be consumed/exposed but that decision is up to the application, not KubernetesClient itself.
33+
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/metrics-collection
3734

3835
## Sample Code
3936

examples/prometheus/Prometheus.cs

-29
This file was deleted.

examples/prometheus/prometheus.csproj

-7
This file was deleted.

src/KubernetesClient/KubernetesClient.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="prometheus-net" Version="8.2.1" />
1413
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.1.2" />
1514
<PackageReference Include="IdentityModel.OidcClient" Version="5.2.1" />
1615
<PackageReference Include="Fractions" Version="7.3.0" />
@@ -22,4 +21,4 @@
2221
OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
2322
</ItemGroup>
2423

25-
</Project>
24+
</Project>

src/KubernetesClient/PrometheusHandler.cs

-55
This file was deleted.

0 commit comments

Comments
 (0)