Patrol Cloud
Patrol Cloud is a patrol Server we run. It speaks the same wire protocol, so an unmodified patrol.Client talks to it: set BaseURL to the ingest host and Token to the key the console gives you.
What it adds on top of the handler you could run yourself: the events are stored per project and readable in a console with their fields and stacktraces, and the alert destinations are configured there instead of in your code.
package main
import ( "context" "log" "os"
"github.com/kataras/patrol")
func main() { ctx := context.Background()
client := patrol.NewClient(patrol.ClientOptions{ BaseURL: "https://api.patrol.hellenic.dev", Token: os.Getenv("PATROL_KEY"), })
producer := patrol.NewProducer(patrol.ProducerOptions{ ProjectName: "checkout-api", OnError: func(err error) { log.Println("patrol:", err) }, }, client) defer producer.Close(ctx)}That is the whole change to a service that already uses Patrol: one flusher swapped for patrol.NewClient.
The two hosts
Section titled “The two hosts”| Host | What it is |
|---|---|
https://api.patrol.hellenic.dev |
Ingest and the console API. This is a Client’s BaseURL |
/app/ |
The console, on this site. Sign in with GitHub |
What it holds
Section titled “What it holds”An account, its projects, the hashed ingest keys, the events inside each project’s retention window, the destinations and their delivery results. Credentials given to a destination are encrypted at rest and are never returned by the API.
Events are deleted when the plan’s retention window passes. Nothing else expires.
Self-hosted or hosted
Section titled “Self-hosted or hosted”Same library, same protocol, and both can run at once: a producer takes as many flushers as you give it.
Your own Server |
Patrol Cloud | |
|---|---|---|
| Where the credentials live | Your config file | The console, encrypted at rest |
| Storage | Whatever you attach, patrol.SQL or your own flusher |
Included, per plan retention |
| Reading past events | Your database | The console |
| Who is on call for it | You | Us |
| Cost | Your server | See pricing |
Where to go next
Section titled “Where to go next”- Projects, what a project is and how
ProjectNamemaps onto one - Ingest keys, the credential a
Clientsends - Destinations, Slack, Discord, email and Twilio configured outside your code
- Rules, which events reach which destination
- Limits, what each plan allows and what happens at the edge of it