@oas-tools/oas-telemetry 0.1.3 → 0.1.4
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.
- package/README.md +4 -3
- package/dist/index.cjs +1 -0
- package/package.json +2 -2
- package/src/index.js +1 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OAS TELEMETRY
|
|
2
2
|
|
|
3
|
-
OAS Telemetry
|
|
3
|
+
OAS Telemetry offers an express middleware designed for collecting telemetry data using Open Telemetry in applications built using the OpenAPI Specification (OAS). This middleware allows developers to easily incorporate telemetry functionality into their APIs.
|
|
4
4
|
|
|
5
5
|
OAS Telemetry provides a set of endpoints that can be accessed to perform various actions related to telemetry data, such as starting and stopping data collection, resetting telemetry data, listing collected data, and searching for specific telemetry records. These endpoints can be easily integrated into an Express.js application, providing developers with a convenient way to manage and analyze telemetry data.
|
|
6
6
|
|
|
@@ -53,11 +53,12 @@ OAS Telemetry middleware adds the following endpoints to your Express applicatio
|
|
|
53
53
|
- /telemetry/reset: Reset telemetry data.
|
|
54
54
|
- /telemetry/list: List all telemetry data.
|
|
55
55
|
- /telemetry/find (POST): Search telemetry data.
|
|
56
|
+
- /telemetry/heapStats: Shows v8 heapStats.
|
|
56
57
|
|
|
57
58
|
## CommonJs Example
|
|
58
59
|
```js index.cjs
|
|
59
60
|
// this MUST be the first line in your file (before any imports)
|
|
60
|
-
const oasTelemetry = require('oas-telemetry');
|
|
61
|
+
const oasTelemetry = require('@oas-tools/oas-telemetry');
|
|
61
62
|
|
|
62
63
|
const express = require('express');
|
|
63
64
|
const app = express();
|
|
@@ -79,7 +80,7 @@ app.listen(port, () => {
|
|
|
79
80
|
## ESM Example
|
|
80
81
|
```js index.mjs
|
|
81
82
|
// simple express API in ES6 Syntax
|
|
82
|
-
import oasTelemetry from 'oas-telemetry';
|
|
83
|
+
import oasTelemetry from '@oas-tools/oas-telemetry';
|
|
83
84
|
import express from 'express';
|
|
84
85
|
const app = express();
|
|
85
86
|
const port = 3000;
|
package/dist/index.cjs
CHANGED
|
@@ -39,6 +39,7 @@ const landingPage = (req, res) => {
|
|
|
39
39
|
<li><a href="/telemetry/stop">/telemetry/stop</a></li>
|
|
40
40
|
<li><a href="/telemetry/reset">/telemetry/reset</a></li>
|
|
41
41
|
<li><a href="/telemetry/list">/telemetry/list</a></li>
|
|
42
|
+
<li><a href="/telemetry/heapStats">/telemetry/heapStats</a></li>
|
|
42
43
|
<li>/telemetry/find [POST]</li>
|
|
43
44
|
</ul>
|
|
44
45
|
`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oas-tools/oas-telemetry",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "This package
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "This package exports an express midelware that allows to trace the requests and responses of an express application using OpenTelemetry",
|
|
5
5
|
"author": "Manuel Otero",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Alejandro Santisteban"
|
package/src/index.js
CHANGED
|
@@ -35,6 +35,7 @@ const landingPage = (req, res) => {
|
|
|
35
35
|
<li><a href="/telemetry/stop">/telemetry/stop</a></li>
|
|
36
36
|
<li><a href="/telemetry/reset">/telemetry/reset</a></li>
|
|
37
37
|
<li><a href="/telemetry/list">/telemetry/list</a></li>
|
|
38
|
+
<li><a href="/telemetry/heapStats">/telemetry/heapStats</a></li>
|
|
38
39
|
<li>/telemetry/find [POST]</li>
|
|
39
40
|
</ul>
|
|
40
41
|
`;
|