Skip to content

Commit

Permalink
feat: Standardize to /__error__ for sentry error check (#278)
Browse files Browse the repository at this point in the history
Closes #274
  • Loading branch information
jrconlin committed Jun 4, 2021
1 parent 35f0b40 commit 3f0dc8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autoendpoint/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ impl Server {
// Health checks
.service(web::resource("/status").route(web::get().to(status_route)))
.service(web::resource("/health").route(web::get().to(health_route)))
// legacy
.service(web::resource("/v1/err").route(web::get().to(log_check)))
// standardized
.service(web::resource("/__error__").route(web::get().to(log_check)))
// Dockerflow
.service(web::resource("/__heartbeat__").route(web::get().to(health_route)))
.service(web::resource("/__lbheartbeat__").route(web::get().to(lb_heartbeat_route)))
Expand Down
3 changes: 3 additions & 0 deletions autopush/src/server/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ impl Future for Dispatch {
}
Some(ref path) if *path == "/__lbheartbeat__" => RequestType::LBHeartBeat,
Some(ref path) if *path == "/__version__" => RequestType::Version,
// legacy:
Some(ref path) if path.starts_with("/v1/err/crit") => RequestType::LogCheck,
// standardized:
Some(ref path) if *path == ("/__error__") => RequestType::LogCheck,
_ => {
debug!("unknown http request {:?}", req);
return Err("unknown http request".into());
Expand Down

0 comments on commit 3f0dc8f

Please sign in to comment.