apitally 0.25.2 → 0.25.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +131 -88
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  </a>
9
9
  </p>
10
10
  <p align="center"><b>API monitoring & analytics made simple</b></p>
11
- <p align="center" style="color: #ccc;">Real-time metrics, request logs, and alerts for your APIs — with just a few lines of code.</p>
11
+ <p align="center" style="color: #ccc;">Metrics, logs, traces, and alerts for your APIs — with just a few lines of code.</p>
12
12
  <br>
13
13
  <img alt="Apitally screenshots" src="https://assets.apitally.io/screenshots/overview.png">
14
14
  <br>
@@ -19,18 +19,8 @@
19
19
  [![Codecov](https://codecov.io/gh/apitally/apitally-js/graph/badge.svg?token=j5jqlrL7Pd)](https://codecov.io/gh/apitally/apitally-js)
20
20
  [![npm](https://img.shields.io/npm/v/apitally?logo=npm&color=%23cb0000)](https://www.npmjs.com/package/apitally)
21
21
 
22
- This SDK for Apitally currently supports the following Node.js web
23
- frameworks:
24
-
25
- - [Express](https://docs.apitally.io/frameworks/express)
26
- - [Fastify](https://docs.apitally.io/frameworks/fastify)
27
- - [NestJS](https://docs.apitally.io/frameworks/nestjs)
28
- - [AdonisJS](https://docs.apitally.io/frameworks/adonisjs)
29
- - [Hono](https://docs.apitally.io/frameworks/hono)
30
- - [H3](https://docs.apitally.io/frameworks/h3) (v2)
31
- - [Elysia](https://docs.apitally.io/frameworks/elysia)
32
- - [Koa](https://docs.apitally.io/frameworks/koa)
33
- - [Hapi](https://docs.apitally.io/frameworks/hapi)
22
+ Apitally is a simple API monitoring and analytics tool that makes it easy to understand how your APIs are used
23
+ and helps you troubleshoot API issues faster. Setup is easy and takes less than 5 minutes.
34
24
 
35
25
  Learn more about Apitally on our 🌎 [website](https://apitally.io) or check out
36
26
  the 📚 [documentation](https://docs.apitally.io).
@@ -39,44 +29,61 @@ the 📚 [documentation](https://docs.apitally.io).
39
29
 
40
30
  ### API analytics
41
31
 
42
- Track traffic, error and performance metrics for your API, each endpoint and individual API consumers, allowing you to make informed, data-driven engineering and product decisions.
32
+ Track traffic, error and performance metrics for your API, each endpoint and
33
+ individual API consumers, allowing you to make informed, data-driven engineering
34
+ and product decisions.
43
35
 
44
- ### Error tracking
36
+ ### Request logs
45
37
 
46
- Understand which validation rules in your endpoints cause client errors. Capture error details and stack traces for 500 error responses, and have them linked to Sentry issues automatically.
38
+ Drill down from insights to individual API requests or use powerful search and filters to
39
+ find specific requests. View correlated application logs and traces for a complete picture
40
+ of each request, making troubleshooting faster and easier.
47
41
 
48
- ### Request logging
42
+ ### Error tracking
49
43
 
50
- Drill down from insights to individual requests or use powerful filtering to understand how consumers have interacted with your API. Configure exactly what is included in the logs to meet your requirements.
44
+ Understand which validation rules in your endpoints cause client errors. Capture
45
+ error details and stack traces for 500 error responses, and have them linked to
46
+ Sentry issues automatically.
51
47
 
52
- ### API monitoring & alerting
48
+ ### API monitoring & alerts
53
49
 
54
- Get notified immediately if something isn't right using custom alerts, synthetic uptime checks and heartbeat monitoring. Notifications can be delivered via email, Slack or Microsoft Teams.
50
+ Get notified immediately if something isn't right using custom alerts, synthetic
51
+ uptime checks and heartbeat monitoring. Alert notifications can be delivered via
52
+ email, Slack and Microsoft Teams.
55
53
 
56
- ## Installation
54
+ ## Supported frameworks
57
55
 
58
- You can install this library in your project using `npm` or `yarn`:
56
+ | Framework | Supported versions | Setup guide |
57
+ | --------------------------------------------------- | --------------------- | ------------------------------------------------------ |
58
+ | [**Express**](https://github.com/expressjs/express) | `4.x`, `5.x` | [Link](https://docs.apitally.io/setup-guides/express) |
59
+ | [**Fastify**](https://github.com/fastify/fastify) | `4.x`, `5.x` | [Link](https://docs.apitally.io/setup-guides/fastify) |
60
+ | [**NestJS**](https://github.com/nestjs/nest) | `9.x`, `10.x`, `11.x` | [Link](https://docs.apitally.io/setup-guides/nestjs) |
61
+ | [**AdonisJS**](https://github.com/adonisjs/core) | `6.x` | [Link](https://docs.apitally.io/setup-guides/adonisjs) |
62
+ | [**Hono**](https://github.com/honojs/hono) \* | `4.x` | [Link](https://docs.apitally.io/setup-guides/hono) |
63
+ | [**H3**](https://github.com/h3js/h3) | `2.x` | [Link](https://docs.apitally.io/setup-guides/h3) |
64
+ | [**Elysia**](https://github.com/elysiajs/elysia) | `1.x` | [Link](https://docs.apitally.io/setup-guides/elysia) |
65
+ | [**Koa**](https://github.com/koajs/koa) | `2.x`, `3.x` | [Link](https://docs.apitally.io/setup-guides/koa) |
66
+ | [**Hapi**](https://github.com/hapijs/hapi) | `21.x` | [Link](https://docs.apitally.io/setup-guides/hapi) |
59
67
 
60
- ```bash
61
- npm install apitally
62
- ```
68
+ \* For Hono on Cloudflare Workers use our [Serverless SDK](https://github.com/apitally/apitally-js-serverless) instead.
63
69
 
64
- or
70
+ Apitally also supports many other web frameworks in [Python](https://github.com/apitally/apitally-py), [Go](https://github.com/apitally/apitally-go), [.NET](https://github.com/apitally/apitally-dotnet) and [Java](https://github.com/apitally/apitally-java) via our other SDKs.
65
71
 
66
- ```bash
67
- yarn add apitally
68
- ```
72
+ ## Getting started
69
73
 
70
- ## Usage
74
+ If you don't have an Apitally account yet, first [sign up here](https://app.apitally.io/?signup). Then create an app in the Apitally dashboard. You'll see detailed setup instructions with code snippets you can copy and paste. These also include your client ID.
71
75
 
72
- Our comprehensive [setup guides](https://docs.apitally.io/quickstart) include
73
- all the details you need to get started.
76
+ See the [SDK reference](https://docs.apitally.io/sdk-reference/javascript) for all available configuration options, including how to mask sensitive data, customize request logging, and more.
74
77
 
75
78
  ### Express
76
79
 
77
- This is an example of how to use the Apitally middleware with an Express
78
- application. For further instructions, see our
79
- [setup guide for Express](https://docs.apitally.io/frameworks/express).
80
+ Install the SDK:
81
+
82
+ ```bash
83
+ npm install apitally
84
+ ```
85
+
86
+ Then add the Apitally middleware to your application:
80
87
 
81
88
  ```javascript
82
89
  const express = require("express");
@@ -91,50 +98,50 @@ useApitally(app, {
91
98
  });
92
99
  ```
93
100
 
94
- ### Fastify
101
+ For further instructions, see our
102
+ [setup guide for Express](https://docs.apitally.io/setup-guides/express).
95
103
 
96
- This is an example of how to register the Apitally plugin with a Fastify
97
- application. For further instructions, see our
98
- [setup guide for Fastify](https://docs.apitally.io/frameworks/fastify).
104
+ ### Fastify
99
105
 
100
- The Apitally plugin requires the
101
- [`fastify-plugin`](https://www.npmjs.com/package/fastify-plugin) package to be
102
- installed.
106
+ Install the SDK with the `fastify-plugin` peer dependency:
103
107
 
104
108
  ```bash
105
- npm install fastify-plugin
109
+ npm install apitally fastify-plugin
106
110
  ```
107
111
 
112
+ Then register the Apitally plugin with your application:
113
+
108
114
  ```javascript
109
- const fastify = require("fastify")({ logger: true });
110
- const { apitallyPlugin } = require("apitally/fastify");
115
+ import Fastify from "fastify";
116
+ import { apitallyPlugin } from "apitally/fastify";
111
117
 
112
- fastify.register(apitallyPlugin, {
118
+ const fastify = Fastify({ logger: true });
119
+
120
+ await fastify.register(apitallyPlugin, {
113
121
  clientId: "your-client-id",
114
122
  env: "dev", // or "prod" etc.
115
123
  });
116
-
117
- // Wrap your routes in a plugin, so Apitally can detect them
118
- fastify.register((instance, opts, done) => {
119
- instance.get("/", (request, reply) => {
120
- reply.send("hello");
121
- });
122
- done();
123
- });
124
124
  ```
125
125
 
126
- _Note:_ If your project uses ES modules you can use `await fastify.register(...)` and don't need to wrap your routes in a plugin. See the [Fastify V4 migration guide](https://fastify.dev/docs/latest/Guides/Migration-Guide-V4/#synchronous-route-definitions-2954) for more details.
126
+ _Note:_ If your project uses CommonJS you need to wrap your routes in a plugin, so Apitally can detect them.
127
+
128
+ For further instructions, see our
129
+ [setup guide for Fastify](https://docs.apitally.io/setup-guides/fastify).
127
130
 
128
131
  ### NestJS
129
132
 
130
- This is an example of how to use the Apitally middleware with a NestJS
131
- application. For further instructions, see our
132
- [setup guide for NestJS](https://docs.apitally.io/frameworks/nestjs).
133
+ Install the SDK:
134
+
135
+ ```bash
136
+ npm install apitally
137
+ ```
138
+
139
+ Then add the Apitally middleware to your application:
133
140
 
134
141
  ```javascript
135
- const { NestFactory } = require("@nestjs/core");
136
- const { useApitally } = require("apitally/nestjs");
137
- const { AppModule } = require("./app.module");
142
+ import { NestFactory } from "@nestjs/core";
143
+ import { useApitally } from "apitally/nestjs";
144
+ import { AppModule } from "./app.module";
138
145
 
139
146
  async function bootstrap() {
140
147
  const app = await NestFactory.create(AppModule);
@@ -150,29 +157,35 @@ async function bootstrap() {
150
157
  bootstrap();
151
158
  ```
152
159
 
160
+ For further instructions, see our
161
+ [setup guide for NestJS](https://docs.apitally.io/setup-guides/nestjs).
162
+
153
163
  ### AdonisJS
154
164
 
155
- You can use the following Ace command to configure Apitally in your AdonisJS application:
165
+ Install the SDK:
156
166
 
157
167
  ```bash
158
- node ace configure apitally/adonisjs
168
+ npm install apitally
159
169
  ```
160
170
 
161
- This command will automatically:
171
+ Then use the following Ace command to configure Apitally in your AdonisJS application:
162
172
 
163
- - Create a config file at `config/apitally.ts`
164
- - Register the Apitally provider in `adonisrc.ts`
165
- - Add the Apitally middleware to `start/kernel.ts`
166
- - Add required environment variables to `.env` and `start/env.ts`
173
+ ```bash
174
+ node ace configure apitally/adonisjs
175
+ ```
167
176
 
168
177
  For further instructions, see our
169
- [setup guide for AdonisJS](https://docs.apitally.io/frameworks/adonisjs).
178
+ [setup guide for AdonisJS](https://docs.apitally.io/setup-guides/adonisjs).
170
179
 
171
180
  ### Hono
172
181
 
173
- This is an example of how to use the Apitally middleware with a Hono application.
174
- For further instructions, see our
175
- [setup guide for Hono](https://docs.apitally.io/frameworks/hono).
182
+ Install the SDK:
183
+
184
+ ```bash
185
+ npm install apitally
186
+ ```
187
+
188
+ Then add the Apitally middleware to your application:
176
189
 
177
190
  ```javascript
178
191
  import { Hono } from "hono";
@@ -186,11 +199,18 @@ useApitally(app, {
186
199
  });
187
200
  ```
188
201
 
202
+ For further instructions, see our
203
+ [setup guide for Hono](https://docs.apitally.io/setup-guides/hono).
204
+
189
205
  ### H3
190
206
 
191
- This is an example of how to register the Apitally plugin with an H3 application.
192
- For further instructions, see our
193
- [setup guide for H3](https://docs.apitally.io/frameworks/h3).
207
+ Install the SDK:
208
+
209
+ ```bash
210
+ npm install apitally
211
+ ```
212
+
213
+ Then register the Apitally plugin with your application:
194
214
 
195
215
  ```javascript
196
216
  import { H3 } from "h3";
@@ -206,13 +226,18 @@ const app = new H3({
206
226
  });
207
227
  ```
208
228
 
209
- _Note:_ Apitally only works with H3 v2 and currently doesn't support nested apps.
229
+ For further instructions, see our
230
+ [setup guide for H3](https://docs.apitally.io/setup-guides/h3).
210
231
 
211
232
  ### Elysia
212
233
 
213
- This is an example of how to use the Apitally plugin with an Elysia application.
214
- For further instructions, see our
215
- [setup guide for Elysia](https://docs.apitally.io/frameworks/elysia).
234
+ Install the SDK:
235
+
236
+ ```bash
237
+ npm install apitally
238
+ ```
239
+
240
+ Then add the Apitally plugin to your application:
216
241
 
217
242
  ```javascript
218
243
  import { Elysia } from "elysia";
@@ -228,11 +253,18 @@ const app = new Elysia()
228
253
  .get("/", () => "hello");
229
254
  ```
230
255
 
256
+ For further instructions, see our
257
+ [setup guide for Elysia](https://docs.apitally.io/setup-guides/elysia).
258
+
231
259
  ### Koa
232
260
 
233
- This is an example of how to use the Apitally middleware with a Koa application.
234
- For further instructions, see our
235
- [setup guide for Koa](https://docs.apitally.io/frameworks/koa).
261
+ Install the SDK:
262
+
263
+ ```bash
264
+ npm install apitally
265
+ ```
266
+
267
+ Then add the Apitally middleware to your application:
236
268
 
237
269
  ```javascript
238
270
  const Koa = require("koa");
@@ -246,11 +278,18 @@ useApitally(app, {
246
278
  });
247
279
  ```
248
280
 
281
+ For further instructions, see our
282
+ [setup guide for Koa](https://docs.apitally.io/setup-guides/koa).
283
+
249
284
  ### Hapi
250
285
 
251
- This is an example of how to use the Apitally plugin with a Hapi application.
252
- For further instructions, see our
253
- [setup guide for Hapi](https://docs.apitally.io/frameworks/hapi).
286
+ Install the SDK:
287
+
288
+ ```bash
289
+ npm install apitally
290
+ ```
291
+
292
+ Then register the Apitally plugin with your application:
254
293
 
255
294
  ```javascript
256
295
  const Hapi = require("@hapi/hapi");
@@ -273,11 +312,15 @@ const init = async () => {
273
312
  init();
274
313
  ```
275
314
 
315
+ For further instructions, see our
316
+ [setup guide for Hapi](https://docs.apitally.io/setup-guides/hapi).
317
+
276
318
  ## Getting help
277
319
 
278
- If you need help please [create a new discussion](https://github.com/orgs/apitally/discussions/categories/q-a) on GitHub
279
- or [join our Slack workspace](https://join.slack.com/t/apitally-community/shared_invite/zt-2b3xxqhdu-9RMq2HyZbR79wtzNLoGHrg).
320
+ If you need help please
321
+ [create a new discussion](https://github.com/orgs/apitally/discussions/categories/q-a)
322
+ on GitHub or email us at [support@apitally.io](mailto:support@apitally.io). We'll get back to you as soon as possible.
280
323
 
281
324
  ## License
282
325
 
283
- This library is licensed under the terms of the MIT license.
326
+ This library is licensed under the terms of the [MIT license](LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apitally",
3
- "version": "0.25.2",
3
+ "version": "0.25.3",
4
4
  "description": "Simple API monitoring & analytics for REST APIs built with Express, Fastify, NestJS, AdonisJS, Hono, H3, Elysia, Hapi, and Koa.",
5
5
  "author": "Apitally <hello@apitally.io>",
6
6
  "license": "MIT",
@@ -323,7 +323,7 @@
323
323
  "fastify": "^5.0.0",
324
324
  "fastify-plugin": "^5.0.1",
325
325
  "globals": "^17.0.0",
326
- "h3": "2.0.1-rc.11",
326
+ "h3": "2.0.1-rc.14",
327
327
  "hono": "^4.6.5",
328
328
  "koa": "^3.0.0",
329
329
  "koa-bodyparser": "^4.4.1",