openevidence-observability
Observability for OpenEvidence. Trigger: "openevidence observability".
What this skill does
# OpenEvidence Observability
## Overview
OpenEvidence delivers clinical evidence queries where response accuracy and freshness have direct patient safety implications. Monitor query response times to ensure clinicians get timely answers, track evidence freshness to catch stale citations, and audit every query for compliance. Observability must also verify citation accuracy and maintain complete audit logs for regulatory requirements (HIPAA, clinical decision support standards).
## Key Metrics
| Metric | Type | Target | Alert Threshold |
|--------|------|--------|-----------------|
| Query response time p95 | Histogram | < 3s | > 8s |
| Evidence freshness | Gauge | < 7 days median | > 30 days |
| Citation accuracy rate | Gauge | > 95% | < 90% |
| API error rate | Gauge | < 0.5% | > 2% |
| Audit log completeness | Gauge | 100% | < 99.9% |
| Daily query volume | Counter | Within quota | > 90% quota |
## Instrumentation
```typescript
async function trackClinicalQuery(queryType: string, fn: () => Promise<any>) {
const start = Date.now();
const traceId = crypto.randomUUID();
try {
const result = await fn();
metrics.histogram('openevidence.query.latency', Date.now() - start, { queryType });
metrics.increment('openevidence.query.total', { queryType });
auditLog.record({ traceId, queryType, status: 'ok', latency: Date.now() - start });
return result;
} catch (err) {
metrics.increment('openevidence.query.errors', { queryType, error: err.code });
auditLog.record({ traceId, queryType, status: 'error', error: err.message });
throw err;
}
}
```
## Health Check Dashboard
```typescript
async function openEvidenceHealth(): Promise<Record<string, string>> {
const latencyP95 = await metrics.query('openevidence.query.latency', 'p95', '5m');
const errorRate = await metrics.query('openevidence.query.error_rate', 'avg', '5m');
const freshness = await openEvAdmin.getMedianEvidenceAge();
return {
query_latency: latencyP95 < 3000 ? 'healthy' : 'slow',
error_rate: errorRate < 0.005 ? 'healthy' : 'degraded',
evidence_freshness: freshness < 7 ? 'healthy' : 'stale',
};
}
```
## Alerting Rules
```typescript
const alerts = [
{ metric: 'openevidence.query.latency_p95', condition: '> 8s', window: '10m', severity: 'warning' },
{ metric: 'openevidence.query.error_rate', condition: '> 0.02', window: '5m', severity: 'critical' },
{ metric: 'openevidence.evidence.median_age_days', condition: '> 30', window: '1d', severity: 'warning' },
{ metric: 'openevidence.audit.completeness', condition: '< 0.999', window: '1h', severity: 'critical' },
];
```
## Structured Logging
```typescript
function logClinicalEvent(event: string, data: Record<string, any>) {
console.log(JSON.stringify({
service: 'openevidence', event,
query_type: data.queryType, duration_ms: data.latency,
citation_count: data.citations, evidence_age_days: data.evidenceAge,
// HIPAA: never log patient identifiers or query text
trace_id: data.traceId, audit_seq: data.auditSeq,
timestamp: new Date().toISOString(),
}));
}
```
## Error Handling
| Signal | Meaning | Action |
|--------|---------|--------|
| Query timeout > 8s | Evidence index overloaded | Check index health, scale read replicas |
| Citation accuracy drop | Stale or retracted sources | Trigger evidence refresh pipeline |
| Audit log gap | Logging pipeline failure | Critical — investigate immediately for compliance |
| 429 rate limit | Quota approaching limit | Throttle non-critical queries, request increase |
| Evidence age > 30 days | Refresh pipeline stalled | Check ingestion jobs, verify source feeds |
## Resources
- [OpenEvidence](https://www.openevidence.com)
## Next Steps
See `openevidence-incident-runbook`.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.