## TL;DR

Verify OTLP variables are all set when no observability data appears. Use EITHER ELASTIC_API_KEY OR APM_SECRET_TOKEN, not both; for Elastic Cloud prefer the API key.

## Fix

1. Verify OTLP variables are all set when no observability data appears.
   Expected: You see the expected output instead of the problem.

## When to use

- You are setting up or using this Elastic Observability APM feature.
- The symptom matches: use API key OR secret token, never both.

## When NOT to use

- Unrelated Elastic Observability APM issues (different feature, different failure).
- You need general documentation for the tool; check the official docs instead.

## Compatibility

Reported against Elastic Observability APM. Source: https://github.com/rajesharma470/elastic-observability-demo.

## Variant phrasings

### use API key OR secret token, never both

## Why it happens

APM agent authentication fails or behaves unexpectedly. Elastic Cloud expects exactly one auth method.

## Edge cases

- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.

## Source

https://github.com/rajesharma470/elastic-observability-demo