Grafana Cloud

Setup Application Observability

Complete the following steps to setup Application Observability and onboard services:

  1. Opt-in for Grafana Cloud metrics generation, if it is not already enabled.
  2. Instrument your application using OpenTelemetry.
  3. Use the Grafana Agent with the OpenTelemetry (OTLP) integration to send telemetry to Grafana Cloud.

Opt-in for metrics generation

Application Observability requires Grafana Cloud metrics generation. Opt-in for Grafana Cloud metrics generation if it is not already enabled. Note, there is a cost associated with enabling this feature.

Grafana Cloud generates metrics from your environment spans and service dependencies to create the dashboards and service map. The following metrics are generated:

traces_service_graph_request_totalCounterclient, server, connection_typeThe number of requests between two nodes
traces_service_graph_request_failed_totalCounterclient, server, connection_typeThe number of failed requests between two nodes
traces_service_graph_request_server_secondsHistogramclient, server, connection_typeThe request time from the server
traces_service_graph_request_client_secondsHistogramclient, server, connection_typeThe request time from the client
traces_service_graph_unpaired_spans_totalCounterclient, server, connection_typeThe number of unpaired spans
traces_service_graph_dropped_spans_totalCounterclient, server, connection_typeThe number of dropped spans
traces_spanmetrics_latencyHistogramDimensionsThe span duration
traces_spanmetrics_calls_totalCounterDimensionsThe count for the span
traces_spanmetrics_size_totalCounterDimensionsThe size of spans ingested

Instrument your application

Instrument your application with the latest OpenTelemetry SDKs to send traces, metrics, and logs to Grafana Cloud. The plugin uses two sources of metrics data, a metrics generator that extracts useful information from traces, and metrics that have been directly sent to the plugin.

Auto-instrumentation for Java, .Net, JavaScript, PHP, Python, and Ruby are recommended to easily produce telemetry that adheres to the OpenTelemetry semantic conventions.

To setup OpenTelemetry for Java, see the OpenTelemetry for Java documentation.

Send telemetry

Use either the Grafana Agent with the OpenTelemetry integration, or the OpenTelemetry Collector, to send telemetry to Grafana Cloud.

Grafana Agent

Grafana Agent is the recommended and supported way to send telemetry data, and allows you to monitor both infrastructure and applications. Follow the Grafana Agent documentation to add OpenTelemetry to your Grafana stack.

The OpenTelemetry (OTLP) integration is the recommended way to configure and manage Grafana Agent for an application instrumented with OpenTelemetry. Follow the Grafana Cloud documentation to install an OpenTelemetry integration for Grafana Cloud.

Use the Add service button from any of the plugin screens to onboard an OpenTelemetry-instrumented service with the Grafana Agent and OpenTelemetry (OTLP) integration.

OpenTelemetry Collector

Alternatively, follow the Grafana OpenTelemetry documentation to connect the OpenTelemetry Collector to Grafana Cloud.

While Application Observability is compatible with the upstream OpenTelemetry Collector distributions, Grafana Labs currently only supports the Grafana Agent, our distribution of the Collector.