# simpledatalogs > Event counters, charts and logs for small apps. Apps and servers POST JSON events or log lines with an ingest key; the dashboard counts them per event, level, device and property. ## Sending events POST https://edge.simpledatalogs.com/v1/ingest Authorization: Bearer Content-Type: application/json (one event or an array), application/x-ndjson, or text/plain log lines Content-Encoding: gzip (optional) User-Agent: / Event object: {"event": "screenshot_taken", "event_id": "", "ts": "2026-10-15T09:14:00.123+02:00", "device_id": "", "props": {"type": "area"}} Log line object: {"level": "error", "message": "upload failed", "ts": "...", "event_id": "...", "props": {"status": 503}} - Keys: sdl_pub_... is write-only and safe in apps and websites; sdl_sec_... stays on servers. - props values are strings, numbers or booleans; unknown top-level fields move under props. - Never send emails, names, IP addresses, tokens or other personal data as props. ## Answers - 202 {"accepted": "..."}: stored. The only success; only now drop the batch. - 401 invalid_key: pause, keep the batch, re-probe every ~10 minutes (a new key takes ~30 s). - 413 payload_too_large: split the batch and resend. - 429 rate_limited or over_quota, 503 busy: retry after Retry-After. - Anything else, a timeout or a network error: retry; event_id makes copies harmless. ## Rules for every sender 1. Batch: apps flush up to 50 events or every 30 s, servers every ~5 s; keep each request under 256 KB (hard limit 512 KB). 2. Keep a durable outbox (a file or table); an event leaves it only after a 202. 3. Retry with exponential backoff and full jitter, 1 s to 5 min, honoring Retry-After. 4. Stamp event_id (UUID) and ts when the event happens, never at send time. 5. Fail open: never block, slow down or crash the app because of analytics. 6. Send a User-Agent naming the SDK and version. ## Drop-in alternatives - OpenTelemetry logs: OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://edge.simpledatalogs.com/v1/logs and OTEL_EXPORTER_OTLP_HEADERS="authorization=Bearer ". - Segment SDKs: set the API host to https://edge.simpledatalogs.com and use the ingest key as the write key. - Sentry SDKs: only change the DSN to https://@edge.simpledatalogs.com/1 (errors and logs only; set traces_sample_rate to 0). - Datadog logs, Loki and Splunk HEC senders: use https://edge.simpledatalogs.com as the intake URL and the ingest key as the API key, token or Loki password. - Plain log shippers (Vector, Fluent Bit): POST NDJSON or text lines to https://edge.simpledatalogs.com/v1/ingest with the Bearer key. - Vercel Log Drains: custom endpoint https://edge.simpledatalogs.com/vercel/v1/logs, header `Authorization: Bearer `, and the same key as the signature secret. - Heroku log drains: heroku drains:add "https://sdl:@edge.simpledatalogs.com/heroku/v1/logs". ## MCP server - Endpoint: https://simpledatalogs.com/mcp (Streamable HTTP, JSON answers, protocols 2025-11-25, 2025-06-18 and 2025-03-26). - Tools: list_projects, list_environments, list_deployments, event_totals, event_series, prop_breakdown, device_stats, search_logs, unparsed_summary, list_counters, spend_summary, list_alerts, list_dashboards. All read-only, at most 90 days and 100 rows per answer. - Setup tools, only with a setup token (Settings → MCP & agents → New token, access "Setup · 24 h", expires in 24 hours): create_project, create_environment, create_deployment, create_key, revoke_key. They create, never edit or delete; revoke_key only revokes keys the same token made. ### Connect a chat app (Claude, ChatGPT and other OAuth clients) - Add https://simpledatalogs.com/mcp as a custom connector, press Connect, sign in, then Approve. No token to copy. - OAuth 2.1 with PKCE (S256): discovery at https://simpledatalogs.com/.well-known/oauth-protected-resource; Client ID Metadata Documents, or dynamic registration at /oauth/register. - One scope, mcp:read, for one organization. Disconnect any time in Settings → MCP & agents. ### Connect with a header (Claude Code, Cursor, scripts) - Auth: Authorization: Bearer sdl_mcp_... (a personal token from Settings → MCP & agents). - Claude Code: claude mcp add --transport http simpledatalogs https://simpledatalogs.com/mcp --header "Authorization: Bearer " - Claude Code can also sign in with OAuth: run the same command without --header, then /mcp to connect. ## Pages - Privacy: https://simpledatalogs.com/privacy - Data processing: https://simpledatalogs.com/data-processing