https://github.com/seek-oss/koala
🐨 Koa add-ons for SEEK-standard tracing, logging and metrics
https://github.com/seek-oss/koala
koa owner-sig-backend-tooling
Last synced: 4 months ago
JSON representation
🐨 Koa add-ons for SEEK-standard tracing, logging and metrics
- Host: GitHub
- URL: https://github.com/seek-oss/koala
- Owner: seek-oss
- License: mit
- Created: 2020-06-09T00:52:53.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2026-02-24T13:51:20.000Z (4 months ago)
- Last Synced: 2026-02-27T15:28:33.964Z (4 months ago)
- Topics: koa, owner-sig-backend-tooling
- Language: TypeScript
- Homepage:
- Size: 3.1 MB
- Stars: 4
- Watchers: 6
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# 🐨 Koa Loose Add-ons
[](https://github.com/seek-oss/koala/actions/workflows/validate.yml)
[](https://github.com/seek-oss/koala/actions/workflows/release.yml)
[](https://www.npmjs.com/package/seek-koala)
[](https://www.npmjs.com/package/seek-koala)
Koala is a collection of Koa add-ons that make it easy to follow SEEK conventions around tracing, logging and metrics.
Refer to the [Koala manifesto](#koala-manifesto) for philosophy behind Koala.
```shell
pnpm add seek-koala
```
## Table of contents
- [Included add-ons](#included-add-ons)
- [Koala manifesto](#koala-manifesto)
- [Contributing](https://github.com/seek-oss/koala/blob/master/CONTRIBUTING.md)
## Included add-ons
- **[AsyncMiddleware](./src/asyncMiddleware/README.md)** facilitates lazy loading of an asynchronously-initialised middleware.
- **[ErrorMiddleware](./src/errorMiddleware/README.md)** catches errors from downstream middleware.
- **[MetricsMiddleware](./src/metricsMiddleware/README.md)** uses [hot-shots](https://github.com/brightcove/hot-shots) to record Datadog metrics about requests and their response codes.
- **[RequestLogging](./src/requestLogging/README.md)** facilitates logging information about requests and responses.
- **[SecureHeaders](./src/secureHeaders/README.md)** attaches response headers that opt-in to stricter browser security policies.
- **[TracingHeaders](./src/tracingHeaders/README.md)** deals with [RFC002 request tracing](https://github.com/SEEK-Jobs/rfc/blob/master/RFC002-RequestIds.md) and `User-Agent` headers.
- **[VersionMiddleware](./src/versionMiddleware/README.md)** attaches app version information to outgoing responses.
## Koala manifesto
- **Koala is not a framework**
It empowers developers to quickly develop SEEK web services using [Koa](https://github.com/koajs/koa) using whatever structure they see fit.
- **Koala does not wrap other packages**
The objects and types of JavaScript packages such as [Axios](https://github.com/axios/axios) and [hot-shots](https://github.com/brightcove/hot-shots) should be used directly.
While Koala may provide constructors for objects from those packages,
developers should always be able to "bring their own instance".
- **Koala does not contain policy**
It does not enforce timeouts, set caching headers, expect certain error objects, etc.
Whenever a default policy is unavoidable it should be called out in the documentation and made configurable.
- **Koala modules should be usable in isolation**
An application should not have to "buy in" to all of Koala at once.
Modules should not require special middleware to set up their state.
- **Koala is not innovative**
It implements best practices from SEEK and follows [internal SEEK RFCs](https://github.com/SEEK-Jobs/rfc) and [s2sauth](https://github.com/SEEK-Jobs/s2sauth) where applicable.
The modular, policy-free nature of Koala allows individual apps to opt-out of Koala's implementation for experimentation.
- **Koala is not a dumping ground**
It strictly contains functionality related to developing Koa web services at SEEK.
It should not include features only relevant to a single application or team.