Appearance


To directly send OpenTelemetry metrics and traces generated by ARMS from your AI Application to New Relic, follow the below steps.
1. Get your Credentials
- Go to the New Relic API Keys UI Page
- Click Create a Key Button
- In the Create an API Key Wizard:
- Set Key Type as
Ingest - License - Give the API Key Name, for example
armsand optionally add any Notes - Click on Create a Key
- Set Key Type as

- Copy the key by clicking on the three dots (...).

2. Instrument your application
SDK
For direct integration into your Python applications:
Function Arguments
python
import elsai_arms
elsai_arms.init(
otlp_endpoint="https://otlp.nr-data.net:443",
otlp_headers="api-key=YOUR_NEWRELIC_LICENSE_KEY"
)Replace:
YOUR_NEWRELIC_LICENSE_KEYwith the API Key value you copied in Step 1.- Example:
api-key=acxxxxxxxx
- Example:
Environment Variables
python
import elsai_arms
elsai_arms.init()Set these environment variables:
shell
export OTEL_EXPORTER_OTLP_ENDPOINT="https://otlp.nr-data.net:443"
export OTEL_EXPORTER_OTLP_HEADERS="api-key=YOUR_NEWRELIC_LICENSE_KEY"Replace:
YOUR_NEWRELIC_LICENSE_KEYwith the API Key value you copied in Step 1.- Example:
api-key=acxxxxxxxx
- Example:
See the ARMS SDK configuration docs for more advanced options.
CLI
For zero-code auto-instrumentation via command line:
CLI Arguments
shell
# Using CLI arguments
elsai-arms-instrument \
--otlp-endpoint "https://otlp.nr-data.net:443" \
--otlp-headers "api-key=YOUR_NEWRELIC_LICENSE_KEY" \
--service-name "my-ai-service" \
--deployment-environment "production" \
python app.pyReplace:
YOUR_NEWRELIC_LICENSE_KEYwith the API Key value you copied in Step 1.- Example:
api-key=acxxxxxxxx
- Example:
Environment Variables
shell
# Set environment variables (takes precedence over CLI args)
export OTEL_EXPORTER_OTLP_ENDPOINT="https://otlp.nr-data.net:443"
export OTEL_EXPORTER_OTLP_HEADERS="api-key=YOUR_NEWRELIC_LICENSE_KEY"
export OTEL_SERVICE_NAME="my-ai-service"
export OTEL_DEPLOYMENT_ENVIRONMENT="production"
# Run your application
elsai-arms-instrument python app.pyReplace:
YOUR_NEWRELIC_LICENSE_KEYwith the API Key value you copied in Step 1.- Example:
api-key=acxxxxxxxx
- Example:
See the ARMS SDK configuration docs for more advanced options.
3. Import the pre-built Dashboard
- Go to one.newrelic.com > Dashboards.
- In the top-right corner, click Import dashboard.
- Copy the dashboard JSON provided in the accordion named
Dashboardbelow. - Paste the dashboard JSON text directly into the text area.
- Choose the account and permission settings for the dashboard. You can't change the account once you've set it, but you can change the permissions at any time.
- Click Import Dashboard.
Dashboard
json
{
"name": "GenAI Observability",
"description": null,
"permissions": "PUBLIC_READ_WRITE",
"pages": [
{
"name": "GenAI Observability",
"description": null,
"widgets": [
{
"title": "",
"layout": {
"column": 1,
"row": 1,
"width": 4,
"height": 2
},
"linkedEntityGuids": null,
"visualization": {
"id": "viz.markdown"
},
"rawConfiguration": {
"text": "# GenAI Observability Dashboard\nThis dashboard displays the usage of Large Language Models (LLM) and Vector Databases, tracking OpenTelemetry Traces and Metrics sent using [OpenLIT](https://elsai.ai)."
}
},
{
"title": "",
"layout": {
"column": 5,
"row": 1,
"width": 4,
"height": 2
},
"linkedEntityGuids": null,
"visualization": {
"id": "viz.billboard"
},
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"nrqlQueries": [
{
"accountIds": [
4060909
],
"query": "SELECT count(`gen_ai.total.requests`) AS 'Total Successful LLM Requests' FROM Metric WHERE `telemetry.sdk.name` = 'elsai-arms'"
}
],
"platformOptions": {
"ignoreTimeRange": false
}
}
},
{
"title": "",
"layout": {
"column": 9,
"row": 1,
"width": 4,
"height": 2
},
"linkedEntityGuids": null,
"visualization": {
"id": "viz.billboard"
},
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"nrqlQueries": [
{
"accountIds": [
4060909
],
"query": "SELECT count(`db.total.requests`) AS 'Total Successful VectorDB Requests' FROM Metric WHERE `telemetry.sdk.name` = 'elsai-arms'"
}
],
"platformOptions": {
"ignoreTimeRange": false
}
}
},
{
"title": "Top GenAI Models by Usage",
"layout": {
"column": 1,
"row": 8,
"width": 6,
"height": 6
},
"linkedEntityGuids": null,
"visualization": {
"id": "viz.bar"
},
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"nrqlQueries": [
{
"accountIds": [
4060909
],
"query": "SELECT count(`gen_ai.total.requests`) FROM Metric FACET `gen_ai.request.model` WHERE `telemetry.sdk.name` = 'elsai-arms' LIMIT 10"
}
],
"platformOptions": {
"ignoreTimeRange": false
}
}
},
{
"title": "GenAI Requests by Platform",
"layout": {
"column": 7,
"row": 8,
"width": 3,
"height": 3
},
"linkedEntityGuids": null,
"visualization": {
"id": "viz.pie"
},
"rawConfiguration": {
"facet": {
"showOtherSeries": true
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountIds": [
4060909
],
"query": "SELECT count(`gen_ai.total.requests`) AS 'GenAI Requests by Platform' FROM Metric FACET `gen_ai.system` WHERE `telemetry.sdk.name` = 'elsai-arms' LIMIT 5"
}
],
"platformOptions": {
"ignoreTimeRange": false
}
}
}
]
}
],
"variables": []
}