Menu
Grafana Cloud

Send to the Grafana Cloud OTLP endpoint

You can send telemetry data from an instrumented application directly to the Grafana Cloud OTLP endpoint for local development or for the purpose of assessing Application Observability.

By default, Application Observability uses a default data source which you can use outside of Application Observability to build further dashboards. You can change the data source from the Application Observability configuration page.

You can learn more about how to send data to the Grafana Cloud OTLP endpoint as well as format considerations such as data storage choices and ingestion limits.

Send to Grafana Cloud OTLP endpoint

Before you begin

Configure your application

Applications instrumented for OpenTelemetry determine where to send telemetry data from application and connection configuration set through environment variables.

Set application environment variables

Customize the following shell script template for your application:

sh
export OTEL_SERVICE_NAME=
export OTEL_RESOURCE_ATTRIBUTES=deployment.environment=,service.namespace=,service.version=,service.instance.id=

Add each value after the equals and remove any optional fields you don’t use.

Variable and fieldDescriptionExample value
OTEL_SERVICE_NAMERequired unique service identifierads, cart
OTEL_RESOURCE_ATTRIBUTESOptional unique deployment environment identifierstaging, production
OTEL_RESOURCE_ATTRIBUTESOptional identifier to group multiple services underandroid, shop
OTEL_RESOURCE_ATTRIBUTESOptional service version1.0.0,
1.2.0 beta 3
OTEL_RESOURCE_ATTRIBUTESOptional unique instance id, e.g the Pod name.
Default auto-generated UUID

Get connection environment variables

Sign in to Grafana Cloud, Launch a stack, and navigate to the OpenTelemetry configuration:

OpenTelemetry tile to connect using the OTLP protocol

Generate a new API token and close the dialog box without copying the token. Copy the environment variables and add them to your shell script.

OpenTelemetry authentication environment variables

Note

If you use Python, replace “Basic " in your shell script with “Basic%20”.

Test your observability

Navigate to Application Observability in Grafana Cloud, and enable metrics generation for your data sources, and after 5 minutes once Application Observability has generated metrics you can see your services.

Alternatively, verify that the agent sent your data by exploring your traces and logs in Tempo and Loki.

Next steps

  1. Observe your services in Application Observability