Microservices observability provides you with tools to collect and present telemetry data in Cloud Monitoring, Cloud Logging, and Cloud Trace from gRPC workloads deployed on Google Cloud and elsewhere.
This documentation is intended for gRPC service owners, site reliability engineers, and anyone who uses telemetry data for troubleshooting and optimizing gRPC workloads.
Observability wraps the OpenCensus plugins for metrics, traces, and gRPC logging into a single unified plugin, without exposing any dependencies. Microservices observability uses observability data that's integrated with Google Cloud products such as Monitoring, Logging, and Trace. The documentation provides instructions for incorporating OpenCensus plugins into your gRPC applications.
To help you collect information and debug your applications, Microservices observability includes the following features:
- Transport-level RPC events logging generation.
- Distributed tracing support.
- Monitoring support.
- Suggested queries in Logging.
- Labels that you define.
This preview is for Google Kubernetes Engine only.
This section describes gRPC observability features.
The observability plugin packages that Google provides for the gRPC languages Java and Go include, by default, integration with Monitoring, Logging, and Trace. Without any configuration, the plugin retrieves metadata about your project and deployment, and configures the default quantities of tracing, metrics, and logging data generation.
Inspect RPC transport-level events
The lifecycle of an RPC can contain metadata events, including headers and trailers; message events; and status events, including OK status and error status. When you use Microservices observability, you can inspect the details for each type of event. You can inspect serialized message length, authority, client/server addresses, and whether the client or the server canceled the RPC.
With explicit settings, Microservices observability can enable payload logging for messages or headers. You can set size limits for the payload logs, control message, or header payload logs separately. You can also specify the target group of methods with or without wildcards.
Distributed tracing support for RPCs
Server architecture can allow an RPC to fan out into multiple RPCs or requests that flow through components. Microservices observability uses distributed tracing to make it easier to analyze and troubleshoot complex systems. The Microservices observability product provides built-in support for gRPC applications to start traces, generate spans, and propagate the tracing context.
Capture measurements for metrics monitoring
The plugin provides first-party support for a wide range of measures at message-level, RPC-level, or method-level, from message counts to latencies. The measurements are uploaded to Monitoring. You can explore the collected metrics using the Monitoring Metrics Explorer, which has a dashboard with a set of pre-existing charts. You can also present the metrics in your own custom dashboards.
To increase the effectiveness of exploring observability data, Microservices observability allows your application to define labels. Labels are key-value pairs that are attached as follows:
- To tracing data as span labels.
- To metrics data as metric labels.
- To logging data as log entry labels.
Labels are helpful when you want to include source versions, canonical service names, or location information.
Microservices observability automatically provides several suggested queries in Logging. For complete information, see Suggested queries.
The following diagram illustrates how Microservices observability collects and serves observability data:
First, you deploy observability configuration to your gRPC workload. The observability configuration consists of fields that you set in an environment variable. The configuration defines the following:
- Trace spans that are exported to Cloud Trace.
- Metrics data that is exported to Monitoring.
- RPC events that are exported to Logging.
You can then view this information on custom dashboards in Monitoring and obtain suggested queries in Logging. You can also export information from Trace, Monitoring, and Logging to third-party platforms of your choice.
For information about setting up Microservices observability, see Set up Microservices observability.
For detailed information about configuration data, trace definitions, metrics definitions, and log definitions, see Microservices observability reference.