Skip to content

Commit

Permalink
Update README and status default code
Browse files Browse the repository at this point in the history
  • Loading branch information
KrustyHack committed Feb 27, 2024
1 parent 7db1b05 commit 5cfb281
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ const axiomDataset = "my-dataset" // Your Axiom dataset
const axiomToken = "xapt-xxx" // Your Axiom API token
```

Update the log filter variable to only send logs with status code above or equal (default to HTTP code 100):
```ts
const logsHttpMinStatusCode = 100 // Filter logs and send only logs with status code above or equal
```

Add triggers for the worker, e.g a route trigger:
- Navigate to the worker and click on the `Triggers` tab.
- Scroll down to Routes and click `Add Route`.
Expand Down
2 changes: 1 addition & 1 deletion src/worker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const axiomDataset = 'my-dataset' // Your Axiom dataset
const axiomToken = 'xapt-xxx' // Your Axiom API token
const logsHttpMinStatusCode = 400 // Filter logs and send only logs with status code above
const logsHttpMinStatusCode = 100 // Filter logs and send only logs with status code above or equal

const requestHeadersToCapture = ['user-agent'];
const responseHeadersToCapture = ['cf-cache-status', 'cf-ray'];
Expand Down

0 comments on commit 5cfb281

Please sign in to comment.