Appearance
Install the SDK
The ARMS SDK is the Python package elsai-arms 3.0.4. It is not on public PyPI. Install it from the Elsai index:
bash
pip install --extra-index-url https://arms-packages.elsaifoundry.ai/root/elsai-arms/ elsai-arms==3.0.4That also installs the zero-code CLI elsai-arms-instrument. Confirm:
bash
elsai-arms-instrument --helpCopy-paste smoke test
Use this to confirm the SDK is installed, an LLM call is auto-instrumented, and a trace reaches ARMS. Create an ingest key in ARMS under Settings → API Keys.
bash
pip install --extra-index-url https://arms-packages.elsaifoundry.ai/root/elsai-arms/ elsai-arms==3.0.4 openaibash
export OPENAI_API_KEY="sk-..."
export ELSAI_OBSERVE_API_KEY="<ingest-api-key>"
export OTEL_RESOURCE_ATTRIBUTES="project.id=<your-project-id>"Copy <your-project-id> from Settings → API Keys on the same page as the ingest key. The API key authenticates ingest; project.id scopes traces to that project in Monitoring → Telemetry. Ingest can succeed without it, but unattributed spans do not match project queries.
Save as test_arms_sdk.py and run python test_arms_sdk.py:
python
import os
import elsai_arms
elsai_arms.init(
application_name="my-service",
environment="production",
otlp_endpoint="https://observe.elsai.ai/api/ingest",
otlp_headers={"x-api-key": os.environ["ELSAI_OBSERVE_API_KEY"]},
)
from openai import OpenAI
client = OpenAI()
completion = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "What is LLM observability?"}],
)
print(completion.choices[0].message.content)Ingest is https://observe.elsai.ai/api/ingest with header x-api-key. For a local ARMS instance, change otlp_endpoint to http://localhost:3000/api/ingest. If you omit otlp_endpoint, the SDK prints to the console instead of ARMS. OTEL_RESOURCE_ATTRIBUTES is read automatically by OpenTelemetry — no code change needed. Open Monitoring → Telemetry and look for application my-service.