How to enable session logs
Session logging sends AI telemetry to the DNotifier dashboard for every sendAI call — session start, completion, token usage, and model.
Enable it with logs: true on the DNotifier constructor (not per request).
Why enable logs?
Audit which model handled a request (
gpt-4o, project default, etc.)Track token usage from responses when available
Debug failed or slow AI calls in Dashboard → Logs
Operate production assistants without reading application logs alone
How to enable logs
const notifier = new DNotifier({
appId: process.env.DNOTIFIER_APP_ID,
secret: process.env.DNOTIFIER_SECRET,
transport: "http",
userId: "user-123",
logs: true,
onConnected: () => {},
onMessage: () => {},
onDisconnected: () => {},
});
await notifier.connect();
await notifier.sendAI({
senderId: "user-123",
provider: "open_ai",
model: "gpt-4o",
message: { text: "Summarize our refund policy." },
saveHistory: true,
});notifier = DNotifier(
app_id=os.environ["DNOTIFIER_APP_ID"],
secret=os.environ["DNOTIFIER_SECRET"],
transport="http",
user_id="user-123",
logs=True,
)
await notifier.connect()
await notifier.send_ai(
sender_id="user-123",
provider="open_ai",
model="gpt-4o",
message={"text": "Summarize our refund policy."},
save_history=True,
)If logs is omitted or false, sendAI still works — nothing is written to dashboard Logs.
What gets logged
Session start
Before the AI request is sent
Session complete
After HTTP response (or WebSocket AI reply)
Token usage
From response usage when present
Model
From sendAI / agent model, else project default (current_model)
Transport notes
http
Start before request; complete after response (recommended)
ws
Start on send; complete when AI reply (code: 300) arrives
Logs vs saveHistory vs observability
Session logs
logs: true
Dashboard ops / tokens / model
AI history
saveHistory: true on sendAI
Product history via fetchAIHistory
Workflow observability
observability: true on Workflow
Multi-agent step graph
Where to view logs
Open Logs
Find the session by time or session id from your
sendAIcall
→ Dashboard overview · Session logging reference
Next steps
Last updated