Manage observability at entrypoint and router level
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
This commit is contained in:
parent
9588e51146
commit
b1934231ca
58 changed files with 1216 additions and 303 deletions
|
@ -1237,8 +1237,6 @@ entryPoints:
|
|||
--entryPoints.foo.udp.timeout=10s
|
||||
```
|
||||
|
||||
{!traefik-for-business-applications.md!}
|
||||
|
||||
## Systemd Socket Activation
|
||||
|
||||
Traefik supports [systemd socket activation](https://www.freedesktop.org/software/systemd/man/latest/systemd-socket-activate.html).
|
||||
|
@ -1260,3 +1258,105 @@ systemd-socket-activate -l 80 -l 443 --fdname web:websecure ./traefik --entrypo
|
|||
!!! warning "Docker Support"
|
||||
|
||||
Socket activation is not supported by Docker but works with Podman containers.
|
||||
|
||||
## Observability Options
|
||||
|
||||
This section is dedicated to options to control observability for an EntryPoint.
|
||||
|
||||
!!! info "Note that you must first enable access-logs, tracing, and/or metrics."
|
||||
|
||||
!!! warning "AddInternals option"
|
||||
|
||||
By default, and for any type of signals (access-logs, metrics and tracing),
|
||||
Traefik disables observability for internal resources.
|
||||
The observability options described below cannot interfere with the `AddInternals` ones,
|
||||
and will be ignored.
|
||||
|
||||
For instance, if a router exposes the `api@internal` service and `metrics.AddInternals` is false,
|
||||
it will never produces metrics, even if the EntryPoint observability configuration enables metrics.
|
||||
|
||||
### AccessLogs
|
||||
|
||||
_Optional, Default=true_
|
||||
|
||||
AccessLogs defines whether a router attached to this EntryPoint produces access-logs by default.
|
||||
Nonetheless, a router defining its own observability configuration will opt-out from this default.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
entryPoints:
|
||||
foo:
|
||||
address: ':8000/udp'
|
||||
observability:
|
||||
accessLogs: false
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[entryPoints.foo]
|
||||
address = ":8000/udp"
|
||||
|
||||
[entryPoints.foo.observability]
|
||||
accessLogs = false
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--entryPoints.foo.address=:8000/udp
|
||||
--entryPoints.foo.observability.accessLogs=false
|
||||
```
|
||||
|
||||
### Metrics
|
||||
|
||||
_Optional, Default=true_
|
||||
|
||||
Metrics defines whether a router attached to this EntryPoint produces metrics by default.
|
||||
Nonetheless, a router defining its own observability configuration will opt-out from this default.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
entryPoints:
|
||||
foo:
|
||||
address: ':8000/udp'
|
||||
observability:
|
||||
metrics: false
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[entryPoints.foo]
|
||||
address = ":8000/udp"
|
||||
|
||||
[entryPoints.foo.observability]
|
||||
metrics = false
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--entryPoints.foo.address=:8000/udp
|
||||
--entryPoints.foo.observability.metrics=false
|
||||
```
|
||||
|
||||
### Tracing
|
||||
|
||||
_Optional, Default=true_
|
||||
|
||||
Tracing defines whether a router attached to this EntryPoint produces traces by default.
|
||||
Nonetheless, a router defining its own observability configuration will opt-out from this default.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
entryPoints:
|
||||
foo:
|
||||
address: ':8000/udp'
|
||||
observability:
|
||||
tracing: false
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[entryPoints.foo]
|
||||
address = ":8000/udp"
|
||||
|
||||
[entryPoints.foo.observability]
|
||||
tracing = false
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--entryPoints.foo.address=:8000/udp
|
||||
--entryPoints.foo.observability.tracing=false
|
||||
```
|
||||
|
||||
{!traefik-for-business-applications.md!}
|
||||
|
|
|
@ -111,6 +111,30 @@ For example, to change the rule, you could add the tag ```traefik.http.routers.m
|
|||
traefik.http.routers.myrouter.tls.options=foobar
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.accesslogs`"
|
||||
|
||||
See accesslogs [option](../routers/index.md#accesslogs) for more information.
|
||||
|
||||
```yaml
|
||||
traefik.http.routers.myrouter.observability.accesslogs=true
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.metrics`"
|
||||
|
||||
See metrics [option](../routers/index.md#metrics) for more information.
|
||||
|
||||
```yaml
|
||||
traefik.http.routers.myrouter.observability.metrics=true
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.tracing`"
|
||||
|
||||
See tracing [option](../routers/index.md#tracing) for more information.
|
||||
|
||||
```yaml
|
||||
traefik.http.routers.myrouter.observability.tracing=true
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.priority`"
|
||||
|
||||
See [priority](../routers/index.md#priority) for more information.
|
||||
|
|
|
@ -224,6 +224,30 @@ For example, to change the rule, you could add the label ```traefik.http.routers
|
|||
- "traefik.http.routers.myrouter.tls.options=foobar"
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.accesslogs`"
|
||||
|
||||
See accesslogs [option](../routers/index.md#accesslogs) for more information.
|
||||
|
||||
```yaml
|
||||
- "traefik.http.routers.myrouter.observability.accesslogs=true"
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.metrics`"
|
||||
|
||||
See metrics [option](../routers/index.md#metrics) for more information.
|
||||
|
||||
```yaml
|
||||
- "traefik.http.routers.myrouter.observability.metrics=true"
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.tracing`"
|
||||
|
||||
See tracing [option](../routers/index.md#tracing) for more information.
|
||||
|
||||
```yaml
|
||||
- "traefik.http.routers.myrouter.observability.tracing=true"
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.priority`"
|
||||
|
||||
See [priority](../routers/index.md#priority) for more information.
|
||||
|
|
|
@ -111,6 +111,30 @@ For example, to change the rule, you could add the label ```traefik.http.routers
|
|||
traefik.http.routers.myrouter.tls.options=foobar
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.accesslogs`"
|
||||
|
||||
See accesslogs [option](../routers/index.md#accesslogs) for more information.
|
||||
|
||||
```yaml
|
||||
traefik.http.routers.myrouter.observability.accesslogs=true
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.metrics`"
|
||||
|
||||
See metrics [option](../routers/index.md#metrics) for more information.
|
||||
|
||||
```yaml
|
||||
traefik.http.routers.myrouter.observability.metrics=true
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.tracing`"
|
||||
|
||||
See tracing [option](../routers/index.md#tracing) for more information.
|
||||
|
||||
```yaml
|
||||
traefik.http.routers.myrouter.observability.tracing=true
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.priority`"
|
||||
|
||||
See [priority](../routers/index.md#priority) for more information.
|
||||
|
|
|
@ -332,17 +332,21 @@ Register the `IngressRoute` [kind](../../reference/dynamic-configuration/kuberne
|
|||
middlewares: # [5]
|
||||
- name: middleware1 # [6]
|
||||
namespace: default # [7]
|
||||
services: # [8]
|
||||
observability: # [8]
|
||||
accesslogs: true # [9]
|
||||
metrics: true # [10]
|
||||
tracing: true # [11]
|
||||
services: # [12]
|
||||
- kind: Service
|
||||
name: foo
|
||||
namespace: default
|
||||
passHostHeader: true
|
||||
port: 80 # [9]
|
||||
port: 80 # [13]
|
||||
responseForwarding:
|
||||
flushInterval: 1ms
|
||||
scheme: https
|
||||
serversTransport: transport # [10]
|
||||
healthCheck: # [11]
|
||||
serversTransport: transport # [14]
|
||||
healthCheck: # [15]
|
||||
path: /health
|
||||
interval: 15s
|
||||
sticky:
|
||||
|
@ -355,17 +359,17 @@ Register the `IngressRoute` [kind](../../reference/dynamic-configuration/kuberne
|
|||
path: /foo
|
||||
strategy: RoundRobin
|
||||
weight: 10
|
||||
nativeLB: true # [12]
|
||||
nodePortLB: true # [13]
|
||||
tls: # [14]
|
||||
secretName: supersecret # [15]
|
||||
options: # [16]
|
||||
name: opt # [17]
|
||||
namespace: default # [18]
|
||||
certResolver: foo # [19]
|
||||
domains: # [20]
|
||||
- main: example.net # [21]
|
||||
sans: # [22]
|
||||
nativeLB: true # [16]
|
||||
nodePortLB: true # [17]
|
||||
tls: # [18]
|
||||
secretName: supersecret # [19]
|
||||
options: # [20]
|
||||
name: opt # [21]
|
||||
namespace: default # [22]
|
||||
certResolver: foo # [23]
|
||||
domains: # [24]
|
||||
- main: example.net # [25]
|
||||
sans: # [26]
|
||||
- a.example.net
|
||||
- b.example.net
|
||||
```
|
||||
|
@ -379,21 +383,25 @@ Register the `IngressRoute` [kind](../../reference/dynamic-configuration/kuberne
|
|||
| [5] | `routes[n].middlewares` | List of reference to [Middleware](#kind-middleware) |
|
||||
| [6] | `middlewares[n].name` | Defines the [Middleware](#kind-middleware) name |
|
||||
| [7] | `middlewares[n].namespace` | Defines the [Middleware](#kind-middleware) namespace. It can be omitted when the Middleware is in the IngressRoute namespace. |
|
||||
| [8] | `routes[n].services` | List of any combination of [TraefikService](#kind-traefikservice) and reference to a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) (See below for `ExternalName Service` setup) |
|
||||
| [9] | `services[n].port` | Defines the port of a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/). This can be a reference to a named port. |
|
||||
| [10] | `services[n].serversTransport` | Defines the reference to a [ServersTransport](#kind-serverstransport). The ServersTransport namespace is assumed to be the [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) namespace (see [ServersTransport reference](#serverstransport-reference)). |
|
||||
| [11] | `services[n].healthCheck` | Defines the HealthCheck when service references a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) of type ExternalName. |
|
||||
| [12] | `services[n].nativeLB` | Controls, when creating the load-balancer, whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP. |
|
||||
| [13] | `services[n].nodePortLB` | Controls, when creating the load-balancer, whether the LB's children are directly the nodes internal IPs using the nodePort when the service type is NodePort. |
|
||||
| [14] | `tls` | Defines [TLS](../routers/index.md#tls) certificate configuration |
|
||||
| [15] | `tls.secretName` | Defines the [secret](https://kubernetes.io/docs/concepts/configuration/secret/) name used to store the certificate (in the `IngressRoute` namespace) |
|
||||
| [16] | `tls.options` | Defines the reference to a [TLSOption](#kind-tlsoption) |
|
||||
| [17] | `options.name` | Defines the [TLSOption](#kind-tlsoption) name |
|
||||
| [18] | `options.namespace` | Defines the [TLSOption](#kind-tlsoption) namespace |
|
||||
| [19] | `tls.certResolver` | Defines the reference to a [CertResolver](../routers/index.md#certresolver) |
|
||||
| [20] | `tls.domains` | List of [domains](../routers/index.md#domains) |
|
||||
| [21] | `domains[n].main` | Defines the main domain name |
|
||||
| [22] | `domains[n].sans` | List of SANs (alternative domains) |
|
||||
| [8] | `routes[n].observability` | Defines the route observability configuration. |
|
||||
| [9] | `observability.accesslogs` | Defines whether the route will produce [access-logs](../routers/index.md#accesslogs). |
|
||||
| [10] | `observability.metrics` | Defines whether the route will produce [metrics](../routers/index.md#metrics). |
|
||||
| [11] | `observability.tracing` | Defines whether the route will produce [traces](../routers/index.md#tracing). |
|
||||
| [12] | `routes[n].services` | List of any combination of [TraefikService](#kind-traefikservice) and reference to a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) (See below for `ExternalName Service` setup) |
|
||||
| [13] | `services[n].port` | Defines the port of a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/). This can be a reference to a named port. |
|
||||
| [14] | `services[n].serversTransport` | Defines the reference to a [ServersTransport](#kind-serverstransport). The ServersTransport namespace is assumed to be the [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) namespace (see [ServersTransport reference](#serverstransport-reference)). |
|
||||
| [15] | `services[n].healthCheck` | Defines the HealthCheck when service references a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) of type ExternalName. |
|
||||
| [16] | `services[n].nativeLB` | Controls, when creating the load-balancer, whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP. |
|
||||
| [17] | `services[n].nodePortLB` | Controls, when creating the load-balancer, whether the LB's children are directly the nodes internal IPs using the nodePort when the service type is NodePort. |
|
||||
| [18] | `tls` | Defines [TLS](../routers/index.md#tls) certificate configuration |
|
||||
| [19] | `tls.secretName` | Defines the [secret](https://kubernetes.io/docs/concepts/configuration/secret/) name used to store the certificate (in the `IngressRoute` namespace) |
|
||||
| [20] | `tls.options` | Defines the reference to a [TLSOption](#kind-tlsoption) |
|
||||
| [21] | `options.name` | Defines the [TLSOption](#kind-tlsoption) name |
|
||||
| [22] | `options.namespace` | Defines the [TLSOption](#kind-tlsoption) namespace |
|
||||
| [23] | `tls.certResolver` | Defines the reference to a [CertResolver](../routers/index.md#certresolver) |
|
||||
| [24] | `tls.domains` | List of [domains](../routers/index.md#domains) |
|
||||
| [25] | `domains[n].main` | Defines the main domain name |
|
||||
| [26] | `domains[n].sans` | List of SANs (alternative domains) |
|
||||
|
||||
??? example "Declaring an IngressRoute"
|
||||
|
||||
|
|
|
@ -288,6 +288,30 @@ which in turn will create the resulting routers, services, handlers, etc.
|
|||
traefik.ingress.kubernetes.io/router.tls.options: foobar@file
|
||||
```
|
||||
|
||||
??? info "`traefik.ingress.kubernetes.io/router.observability.accesslogs`"
|
||||
|
||||
See accesslogs [option](../routers/index.md#accesslogs) for more information.
|
||||
|
||||
```yaml
|
||||
traefik.ingress.kubernetes.io/router.observability.accesslogs: true
|
||||
```
|
||||
|
||||
??? info "`traefik.ingress.kubernetes.io/router.observability.metrics`"
|
||||
|
||||
See metrics [option](../routers/index.md#metrics) for more information.
|
||||
|
||||
```yaml
|
||||
traefik.ingress.kubernetes.io/router.observability.metrics: true
|
||||
```
|
||||
|
||||
??? info "`traefik.ingress.kubernetes.io/router.observability.tracing`"
|
||||
|
||||
See tracing [option](../routers/index.md#tracing) for more information.
|
||||
|
||||
```yaml
|
||||
traefik.ingress.kubernetes.io/router.observability.tracing: true
|
||||
```
|
||||
|
||||
#### On Service
|
||||
|
||||
??? info "`traefik.ingress.kubernetes.io/service.nativelb`"
|
||||
|
|
|
@ -95,6 +95,30 @@ A Story of key & values
|
|||
|---------------------------------------------|----------|
|
||||
| `traefik/http/routers/myrouter/tls/options` | `foobar` |
|
||||
|
||||
??? info "`traefik/http/routers/<router_name>/observability/accesslogs`"
|
||||
|
||||
See accesslogs [option](../routers/index.md#accesslogs) for more information.
|
||||
|
||||
| Key (Path) | Value |
|
||||
|----------------------------------------------------------|--------|
|
||||
| `traefik/http/routers/myrouter/observability/accesslogs` | `true` |
|
||||
|
||||
??? info "`traefik/http/routers/<router_name>/observability/metrics`"
|
||||
|
||||
See metrics [option](../routers/index.md#metrics) for more information.
|
||||
|
||||
| Key (Path) | Value |
|
||||
|-------------------------------------------------------|--------|
|
||||
| `traefik/http/routers/myrouter/observability/metrics` | `true` |
|
||||
|
||||
??? info "`traefik/http/routers/<router_name>/observability/tracing`"
|
||||
|
||||
See tracing [option](../routers/index.md#tracing) for more information.
|
||||
|
||||
| Key (Path) | Value |
|
||||
|-------------------------------------------------------|--------|
|
||||
| `traefik/http/routers/myrouter/observability/tracing` | `true` |
|
||||
|
||||
??? info "`traefik/http/routers/<router_name>/priority`"
|
||||
|
||||
See [priority](../routers/index.md#priority) for more information.
|
||||
|
|
|
@ -111,6 +111,30 @@ For example, to change the rule, you could add the tag ```traefik.http.routers.m
|
|||
traefik.http.routers.myrouter.tls.options=foobar
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.accesslogs`"
|
||||
|
||||
See accesslogs [option](../routers/index.md#accesslogs) for more information.
|
||||
|
||||
```yaml
|
||||
traefik.http.routers.myrouter.observability.accesslogs=true
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.metrics`"
|
||||
|
||||
See metrics [option](../routers/index.md#metrics) for more information.
|
||||
|
||||
```yaml
|
||||
traefik.http.routers.myrouter.observability.metrics=true
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.tracing`"
|
||||
|
||||
See tracing [option](../routers/index.md#tracing) for more information.
|
||||
|
||||
```yaml
|
||||
traefik.http.routers.myrouter.observability.tracing=true
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.priority`"
|
||||
|
||||
See [priority](../routers/index.md#priority) for more information.
|
||||
|
|
|
@ -7,7 +7,8 @@ There are, however, exceptions when using label-based configurations:
|
|||
and a label defines a service (e.g. implicitly through a loadbalancer server port value),
|
||||
but the router does not specify any service,
|
||||
then that service is automatically assigned to the router.
|
||||
1. If a label defines a router (e.g. through a router Rule) but no service is defined,
|
||||
|
||||
2. If a label defines a router (e.g. through a router Rule) but no service is defined,
|
||||
then a service is automatically created and assigned to the router.
|
||||
|
||||
!!! info ""
|
||||
|
|
|
@ -235,6 +235,30 @@ For example, to change the rule, you could add the label ```traefik.http.routers
|
|||
- "traefik.http.routers.myrouter.tls.options=foobar"
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.accesslogs`"
|
||||
|
||||
See accesslogs [option](../routers/index.md#accesslogs) for more information.
|
||||
|
||||
```yaml
|
||||
- "traefik.http.routers.myrouter.observability.accesslogs=true"
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.metrics`"
|
||||
|
||||
See metrics [option](../routers/index.md#metrics) for more information.
|
||||
|
||||
```yaml
|
||||
- "traefik.http.routers.myrouter.observability.metrics=true"
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.observability.tracing`"
|
||||
|
||||
See tracing [option](../routers/index.md#tracing) for more information.
|
||||
|
||||
```yaml
|
||||
- "traefik.http.routers.myrouter.observability.tracing=true"
|
||||
```
|
||||
|
||||
??? info "`traefik.http.routers.<router_name>.priority`"
|
||||
|
||||
See [priority](../routers/index.md#priority) for more information.
|
||||
|
|
|
@ -877,6 +877,117 @@ The [supported `provider` table](../../https/acme.md#providers) indicates if the
|
|||
!!! warning "Double Wildcard Certificates"
|
||||
It is not possible to request a double wildcard certificate for a domain (for example `*.*.local.com`).
|
||||
|
||||
### Observability
|
||||
|
||||
The Observability section defines a per router behavior regarding access-logs, metrics or tracing.
|
||||
|
||||
The default router observability configuration is inherited from the attached EntryPoints and can be configured with the observability [options](../../routing/entrypoints.md#observability-options).
|
||||
However, a router defining its own observability configuration will opt-out from these defaults.
|
||||
|
||||
!!! info "Note that to enable router-level observability, you must first enable access-logs, tracing, and/or metrics."
|
||||
|
||||
!!! warning "AddInternals option"
|
||||
|
||||
By default, and for any type of signals (access-logs, metrics and tracing),
|
||||
Traefik disables observability for internal resources.
|
||||
The observability options described below cannot interfere with the `AddInternals` ones,
|
||||
and will be ignored.
|
||||
|
||||
For instance, if a router exposes the `api@internal` service and `metrics.AddInternals` is false,
|
||||
it will never produces metrics, even if the router observability configuration enables metrics.
|
||||
|
||||
#### `accessLogs`
|
||||
|
||||
_Optional_
|
||||
|
||||
The `accessLogs` option controls whether the router will produce access-logs.
|
||||
|
||||
??? example "Disable access-logs for a router using the [File Provider](../../providers/file.md)"
|
||||
|
||||
```yaml tab="YAML"
|
||||
## Dynamic configuration
|
||||
http:
|
||||
routers:
|
||||
my-router:
|
||||
rule: "Path(`/foo`)"
|
||||
service: service-foo
|
||||
observability:
|
||||
accessLogs: false
|
||||
```
|
||||
|
||||
```toml tab="TOML"
|
||||
## Dynamic configuration
|
||||
[http.routers]
|
||||
[http.routers.my-router]
|
||||
rule = "Path(`/foo`)"
|
||||
service = "service-foo"
|
||||
[http.routers.my-router.observability]
|
||||
accessLogs = false
|
||||
```
|
||||
|
||||
#### `metrics`
|
||||
|
||||
_Optional_
|
||||
|
||||
The `metrics` option controls whether the router will produce metrics.
|
||||
|
||||
!!! warning "Metrics layers"
|
||||
|
||||
When metrics layers are not enabled with the `addEntryPointsLabels`, `addRoutersLabels` and/or `addServicesLabels` options,
|
||||
enabling metrics for a router will not enable them.
|
||||
|
||||
??? example "Disable metrics for a router using the [File Provider](../../providers/file.md)"
|
||||
|
||||
```yaml tab="YAML"
|
||||
## Dynamic configuration
|
||||
http:
|
||||
routers:
|
||||
my-router:
|
||||
rule: "Path(`/foo`)"
|
||||
service: service-foo
|
||||
observability:
|
||||
metrics: false
|
||||
```
|
||||
|
||||
```toml tab="TOML"
|
||||
## Dynamic configuration
|
||||
[http.routers]
|
||||
[http.routers.my-router]
|
||||
rule = "Path(`/foo`)"
|
||||
service = "service-foo"
|
||||
[http.routers.my-router.observability]
|
||||
metrics = false
|
||||
```
|
||||
|
||||
#### `tracing`
|
||||
|
||||
_Optional_
|
||||
|
||||
The `tracing` option controls whether the router will produce traces.
|
||||
|
||||
??? example "Disable tracing for a router using the [File Provider](../../providers/file.md)"
|
||||
|
||||
```yaml tab="YAML"
|
||||
## Dynamic configuration
|
||||
http:
|
||||
routers:
|
||||
my-router:
|
||||
rule: "Path(`/foo`)"
|
||||
service: service-foo
|
||||
observability:
|
||||
tracing: false
|
||||
```
|
||||
|
||||
```toml tab="TOML"
|
||||
## Dynamic configuration
|
||||
[http.routers]
|
||||
[http.routers.my-router]
|
||||
rule = "Path(`/foo`)"
|
||||
service = "service-foo"
|
||||
[http.routers.my-router.observability]
|
||||
tracing = false
|
||||
```
|
||||
|
||||
## Configuring TCP Routers
|
||||
|
||||
!!! warning "The character `@` is not authorized in the router name"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue