Set up
Install the SDK, set the key, and find the first trace.
This page is the short path from an API key to the first trace. Quickstart and Installation have the details.
1. Get an API key
- Sign in at app.risicare.ai with GitHub or Google. Access is by invitation.
- The first person who signs in to a new organization gets a default project and an API key. The Your API key card on Home shows the key one time. Copy it.
- Everyone else: open Settings → API Keys and click Create API Key. Only an owner or an admin can create a key. Use the Ingest class for tracing and scores. The evaluation helper (
evals.run,risicare eval gate) needs a Secret key, because an Ingest key cannot write evaluations.
A key belongs to one project. The spans that the key sends go to that project.
2. Install the SDK
| Language | Needs | Install |
|---|---|---|
| Python | Python 3.10 or later | pip install risicare |
| JavaScript and TypeScript | Node.js 18 or later | npm install risicare |
3. Set the key
Put the key in an environment variable. Do not write it in your code.
export RISICARE_API_KEY=rsk-...Python. Call init() once, at the start of your process:
import risicare
risicare.init() # reads RISICARE_API_KEYOr set a second variable and only import the SDK. With RISICARE_TRACING=true, import risicare starts tracing with no init() call:
export RISICARE_TRACING=trueimport risicare # put this line before the imports of your LLM librariesJavaScript. Call init(), and patch each provider client:
import { init } from 'risicare';
import { patchOpenAI } from 'risicare/openai';
import OpenAI from 'openai';
init({ apiKey: process.env.RISICARE_API_KEY });
const openai = patchOpenAI(new OpenAI());With no key, the SDK sends nothing.
The SDK captures the text of prompts and completions by default. To keep that text in your process, set RISICARE_TRACE_CONTENT=false. See Configuration.
4. The endpoints
You do not need to set an endpoint. The SDK uses these hosts by default:
| Data | Host | Change it with |
|---|---|---|
| Spans | https://ingest.risicare.ai | RISICARE_ENDPOINT |
| Scores, prompts, evaluations | https://api.risicare.ai | RISICARE_API_ENDPOINT |
To send OpenTelemetry spans without the SDK, use OTLP over HTTP at https://ingest.risicare.ai/v1/traces, with the header Authorization: Bearer rsk-.... See OTLP Ingestion.
5. If you use OpenTelemetry already (Python)
The Python SDK has an OpenTelemetry bridge. It converts the spans of your OpenTelemetry instrumentation and sends them to Risicare. See OpenTelemetry. The JavaScript SDK has no bridge.
6. Providers and frameworks
The SDK traces the calls of these libraries.
| Python | JavaScript | |
|---|---|---|
| Providers | OpenAI, Anthropic, Google, Cohere, Mistral, Groq, Together AI, Ollama, Amazon Bedrock, Vertex AI, Cerebras, HuggingFace, OpenAI-compatible hosts | OpenAI, Anthropic, Vercel AI, and the other providers on Providers |
| Frameworks | LangGraph, CrewAI, AutoGen, LangChain, OpenAI Agents, Instructor, LiteLLM, DSPy, Pydantic AI, LlamaIndex | LangChain, LangGraph, Instructor and LlamaIndex. See Frameworks |
7. Where the first trace appears
- Run your code. A short script must deliver its spans before it exits: call
risicare.shutdown()at the end (JavaScript:await shutdown()). - In the dashboard, open the project and click Traces. The list shows the Last 24 hours.
- The list does not update by itself. Click Refresh to load new traces.
On Home, the Get Started with Risicare card shows until the project receives its first trace.
If no trace appears, read what the SDK printed. A line that starts with Risicare: spans are NOT reaching names the cause. See Quickstart.
8. Add a second service
- Use a key of the same project in the second service. Its traces then go to the same project.
- Give each service its own name:
init(service_name="billing")in Python,init({ serviceName: 'billing' })in JavaScript, orRISICARE_SERVICE_NAME=billing. - To make one trace of a request that goes from one service to the other, send the trace context with the request. The caller adds the
traceparentheader, and the receiver reads it. See Cross-service context propagation (Python) and Cross-process propagation (JavaScript).
Without step 3, each service sends its own traces.