2019-06-14 05:52:50 +00:00
---
2020-04-07 18:55:19 +00:00
layout: docs
2022-09-16 15:28:32 +00:00
page_title: Service Mesh Observability - Overview
2022-09-13 20:34:10 +00:00
description: >-
2022-09-16 15:28:32 +00:00
To use Consul's observability features, configure sidecar proxies in the service mesh to collect and emit L7 metrics. Learn about configuring metrics destinations and a service's protocol and upstreams.
2019-06-14 05:52:50 +00:00
---
2022-09-13 20:34:10 +00:00
# Service Mesh Observability Overview
2019-06-14 05:52:50 +00:00
2023-05-05 17:41:40 +00:00
In order to take advantage of the service mesh's L7 observability features you will need
2019-06-14 05:52:50 +00:00
to:
- Deploy sidecar proxies that are capable of emitting metrics with each of your
services. We have first class support for Envoy.
- Define where your proxies should send metrics that they collect.
- Define the protocols for each of your services.
- Define the upstreams for each of your services.
2019-08-23 15:07:48 +00:00
If you are using Envoy as your sidecar proxy, you will need to [enable
2023-01-25 16:52:43 +00:00
gRPC](/consul/docs/agent/config/config-files#grpc_port) on your client agents. To define the
2019-06-14 05:52:50 +00:00
metrics destination and service protocol you may want to enable [configuration
2023-01-25 16:52:43 +00:00
entries](/consul/docs/agent/config/config-files#config_entries) and [centralized service
configuration](/consul/docs/agent/config/config-files#enable_central_service_config).
2019-10-14 15:40:35 +00:00
2021-03-19 00:20:54 +00:00
### Kubernetes
If you are using Kubernetes, the Helm chart can simplify much of the configuration needed to enable observability. See
2023-01-25 16:52:43 +00:00
our [Kubernetes observability docs](/consul/docs/k8s/connect/observability/metrics) for more information.
2019-06-14 05:52:50 +00:00
2023-02-28 22:09:56 +00:00
### Metrics destination
2019-06-14 05:52:50 +00:00
For Envoy the metrics destination can be configured in the proxy configuration
entry's `config` section.
```
kind = "proxy-defaults"
name = "global"
config {
"envoy_dogstatsd_url": "udp://127.0.0.1:9125"
}
```
2023-05-05 17:41:40 +00:00
Find other possible metrics syncs in the [Envoy documentation](/consul/docs/connect/proxies/envoy#bootstrap-configuration).
2019-06-14 05:52:50 +00:00
2023-02-28 22:09:56 +00:00
### Service protocol
2019-06-14 05:52:50 +00:00
2023-02-28 22:09:56 +00:00
You can specify the [`protocol`](/consul/docs/connect/config-entries/service-defaults#protocol)
2023-09-06 23:55:18 +00:00
for all service instances in the `service-defaults` configuration entry. You can also override the default protocol when defining and registering proxies in a service definition file. Refer to [Expose Paths Configuration Reference](/consul/docs/connect/proxies/proxy-config-reference#expose-paths-configuration-reference) for additional information.
2023-02-28 22:09:56 +00:00
By default, proxies only provide L4 metrics.
Defining the protocol allows proxies to handle requests at the L7
protocol and emit L7 metrics. It also allows proxies to make per-request
2019-06-14 05:52:50 +00:00
load balancing and routing decisions.
2023-02-28 22:09:56 +00:00
### Service upstreams
2019-06-14 05:52:50 +00:00
You can set the upstream for each service using the proxy's
2023-09-06 23:55:18 +00:00
[`upstreams`](/consul/docs/connect/proxies/proxy-config-reference#upstreams)
sidecar parameter, which can be defined in a service's [sidecar registration](/consul/docs/connect/proxies/deploy-sidecar-services).