Create a Grafana Cloud account for local and preview environments if you do not have one already.
Generate a token. The same token will be used by all environments to send telemetry to Grafana Cloud:
Go to your Stack in your Grafana Cloud account for local and preview environments (see Observability for a list of accounts in use), then click Details:
On the page that is shown, scroll down to Open Telemetry then click Configure to be shown configuration details:
ALTERNATIVELY, (if you can’t see a Stack above), go to Home | Getting Started Guide and click the OpenTelemetry panel:
then Quickstart, then an appropriate language:
On the page that is shown, create a token.
Creating a token would show environment variables for OTEL_EXPORTER_OTLP_ENDPOINT
, OTEL_EXPORTER_OTLP_PROTOCOL
and base-64 encoded value of the token you just generated in variable OTEL_EXPORTER_OTLP_HEADERS
. These variables are automatically read by the Otel SDKs (at least in .NET and JavaScript/Node.js SDKs).
ASIDE: You can see all the token you have generated on Access Policies page under Security. Here you regenerate a token you have previously generated:

Note down OTEL_EXPORTER_OTLP_HEADERS
somewhere safe.
A separate Frontend Observability instance needs to be created for each LOCAL environment (for each of the non-local environments - i.e. PR-specific Preview environments, Staging and Production - an environment-specific instance is created by Terraform):
Go back to Grafana Cloud Home and this time select Frontend under Observability to go to the page for the Frontend Observability: