1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "rawText": "Engineer: At 09:02 the anomaly detector flagged rising latency in service auth-gateway. Engineer: Error rate crossed 3% at 09:04. Supervisor: Is this impacting active user sessions? Engineer: Yes, session drops began at 09:05 in region us-east-1. Supervisor: What changed recently? Engineer: A new deployment was pushed at 08:57. Supervisor: Roll back immediately and disable auto-deploy. Engineer: Rolling back to checkpoint v2.8 at 09:07. Engineer: Rollback completed at 09:09. Engineer: Latency is decreasing but error rate is still at 1.2%. Supervisor: Did the circuit breaker trigger? Engineer: Yes, circuit breaker opened at 09:10 and stabilized traffic. Supervisor: Good. Re-enable traffic gradually. Engineer: Traffic ramp-up started at 09:12. Engineer: At 09:14 error rate normalized to 0.1%. Supervisor: Any customer impact? Engineer: Two minor session drops reported, no data loss. Supervisor: Document this incident and schedule a post-mortem. Engineer: Incident report created at 09:18. Engineer: Root cause identified as misconfigured cache timeout. Supervisor: Apply fix in staging only. Engineer: Fix applied in staging at 09:22. Supervisor: Monitor for 10 minutes before redeploying. Engineer: Monitoring shows stable metrics at 09:32. Supervisor: Proceed with controlled redeployment. Engineer: Redeployment completed at 09:35. Engineer: System healthy, all metrics green at 09:37."
12};
13
14
15const run = await client.actor("gunmetal/r3-de").call(input);
16
17
18console.log('Results from dataset');
19console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
20const { items } = await client.dataset(run.defaultDatasetId).listItems();
21items.forEach((item) => {
22 console.dir(item);
23});
24
25