Skip to content

Commit

Permalink
Security considerations for metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
wiktork committed Oct 3, 2024
1 parent 04fe2c4 commit 07556cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions documentation/configuration/metrics-configuration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Metrics Configuration

> [!IMPORTANT]
> See [Security Considerations](../security-considerations.md#prometheus-metrics) for important information regarding security for the metrics endpoint.
## Default Providers

The `/metrics` route (and starting in 8.0, the `/livemetrics` route and `CollectLiveMetrics` actions) will collect metrics from the default providers. The default providers are:
Expand Down
4 changes: 3 additions & 1 deletion documentation/security-considerations.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ $env:Egress__AzureBlobStorage__monitorBlob__AccountKey = "accountKey"; dotnet-mo

For Kubernetes, a preferred alternative is to mount your secrets in the file system with restricted access - for more information and an example of how to do this, view the [Kubernetes documentation](https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/#create-a-pod-that-has-access-to-the-secret-data-through-a-volume). For additional information on how secrets work in Kubernetes, view the following [documentation](https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/#create-a-secret).

## Item 3
## Prometheus metrics

By default, dotnet-monitor exposes [Prometheus](https://prometheus.io/docs/introduction/overview) metrics using http with an unauthenticated endpoint. This is to support the default [scraping configuration](https://learn.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-prometheus-logs?tabs=pod#tabpanel_1_pod). If your application contains custom metrics or tags, ensure that no sensitive data is being emitted in your metrics.

0 comments on commit 07556cf

Please sign in to comment.