Skip to main content

Routing telemetry to an account

CubeAPM picks the account from the credential the agent already sends (see the table below).

  1. Generate a key at Admin → Accounts → License keys.
  2. Set it in the agent's credential field.

Telemetry with an unregistered key goes to the default account (account 1).


Agent credentials​

AgentCredential fieldExample
New Relic APM (all languages)license_keylicense_key: ABC4567890ABC4567890ABC4567890ABC4567890
New Relic Log, Event and Metric APIX-License-Key or Api-Key headerApi-Key: ABC4567890ABC4567890ABC4567890ABC4567890
New Relic Browser agentlicenseKey in NREUM.infolicenseKey:"NRJS-123456789abcdef0123"
New Relic Lambda extensionX-License-KeyX-License-Key: ABC4567890ABC4567890ABC4567890ABC4567890
Datadog AgentDD_API_KEYDD_API_KEY=<your_datadog_key>
Elastic APM agentssecret_token or API keyELASTIC_APM_SECRET_TOKEN=<secret_token>
AWS Data FirehoseX-Amz-Firehose-Access-Key headerX-Amz-Firehose-Access-Key: <value>
OpenTelemetry (traces, metrics, logs)x-cube-token exporter headerOTEL_EXPORTER_OTLP_TRACES_HEADERS=x-cube-token=<account_key>
Anything elseNone. Goes to account 1N/A

Registering a key​

  1. Admin → Accounts, select the account, License keys.
  2. Generate a key or Add existing key.
  3. Name the key.
  • All agents that send the same key go to the same account.
  • A key can belong to only one account.
  • Account admins can view and copy keys at any time.
  • Deleting an account revokes its keys.
  • Revoked keys can't be restored. Data sent with a revoked key isn't visible in any account.

Verification​

Wait a minute or two for agents to flush, then:

  1. In APM, switch to the target account. The service should be listed.
  2. Switch to Default. The service should not be listed.

If the service is still in Default, the agent isn't sending a registered key. Traces, metrics and logs can use different credential settings, so check each.


Troubleshooting​

SymptomLikely cause
Data goes to the default account instead of the targetKey not registered, or the agent sends a different key
A new key isn't routing yet on a multi-node installNew keys take a short time to reach every node
Datadog traces always go to the default accountTracer sends directly to CubeAPM via DD_TRACE_AGENT_URL. Send through the Datadog Agent
OpenTelemetry data goes to the default accountThe exporter's x-cube-token header isn't set
New Relic Browser data isn't routingThe key in the beacon URL doesn't match
Data doesn't show in any accountThe key was revoked. Use a new key
A user can't see an account that has dataThe user isn't a member of that account. See Roles and Permissions
An account that used to work now errorsThe account was deleted. Its data is kept until retention but can't be read