Socket
Socket
Sign inDemoInstall

@opentelemetry/instrumentation-nestjs-core

Package Overview
Dependencies
Maintainers
3
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/instrumentation-nestjs-core - npm Package Compare versions

Comparing version 0.37.1 to 0.38.0

6

build/src/instrumentation.js

@@ -21,8 +21,8 @@ "use strict";

const instrumentation_1 = require("@opentelemetry/instrumentation");
const version_1 = require("./version");
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const version_1 = require("./version");
const enums_1 = require("./enums");
class Instrumentation extends instrumentation_1.InstrumentationBase {
constructor(config = {}) {
super('@opentelemetry/instrumentation-nestjs-core', version_1.VERSION, config);
super(version_1.PACKAGE_NAME, version_1.PACKAGE_VERSION, config);
}

@@ -100,3 +100,3 @@ init() {

const span = tracer.startSpan(spanName, {
attributes: Object.assign(Object.assign({}, Instrumentation.COMMON_ATTRIBUTES), { [enums_1.AttributeNames.VERSION]: moduleVersion, [enums_1.AttributeNames.TYPE]: enums_1.NestType.REQUEST_CONTEXT, [semantic_conventions_1.SemanticAttributes.HTTP_METHOD]: req.method, [semantic_conventions_1.SemanticAttributes.HTTP_URL]: req.originalUrl || req.url, [semantic_conventions_1.SemanticAttributes.HTTP_ROUTE]: ((_a = req.route) === null || _a === void 0 ? void 0 : _a.path) || ((_b = req.routeOptions) === null || _b === void 0 ? void 0 : _b.url) || req.routerPath, [enums_1.AttributeNames.CONTROLLER]: instanceName, [enums_1.AttributeNames.CALLBACK]: callbackName }),
attributes: Object.assign(Object.assign({}, Instrumentation.COMMON_ATTRIBUTES), { [enums_1.AttributeNames.VERSION]: moduleVersion, [enums_1.AttributeNames.TYPE]: enums_1.NestType.REQUEST_CONTEXT, [semantic_conventions_1.SEMATTRS_HTTP_METHOD]: req.method, [semantic_conventions_1.SEMATTRS_HTTP_URL]: req.originalUrl || req.url, [semantic_conventions_1.SEMATTRS_HTTP_ROUTE]: ((_a = req.route) === null || _a === void 0 ? void 0 : _a.path) || ((_b = req.routeOptions) === null || _b === void 0 ? void 0 : _b.url) || req.routerPath, [enums_1.AttributeNames.CONTROLLER]: instanceName, [enums_1.AttributeNames.CALLBACK]: callbackName }),
});

@@ -103,0 +103,0 @@ const spanContext = api.trace.setSpan(api.context.active(), span);

@@ -1,2 +0,3 @@

export declare const VERSION = "0.37.1";
export declare const PACKAGE_VERSION = "0.38.0";
export declare const PACKAGE_NAME = "@opentelemetry/instrumentation-nestjs-core";
//# sourceMappingURL=version.d.ts.map

@@ -18,5 +18,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.VERSION = void 0;
exports.PACKAGE_NAME = exports.PACKAGE_VERSION = void 0;
// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.37.1';
exports.PACKAGE_VERSION = '0.38.0';
exports.PACKAGE_NAME = '@opentelemetry/instrumentation-nestjs-core';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/instrumentation-nestjs-core",
"version": "0.37.1",
"description": "OpenTelemetry NestJS automatic instrumentation package.",
"version": "0.38.0",
"description": "OpenTelemetry instrumentation for NestJS server side applications framework",
"main": "build/src/index.js",

@@ -73,7 +73,7 @@ "types": "build/src/index.d.ts",

"dependencies": {
"@opentelemetry/instrumentation": "^0.51.0",
"@opentelemetry/semantic-conventions": "^1.0.0"
"@opentelemetry/instrumentation": "^0.52.0",
"@opentelemetry/semantic-conventions": "^1.23.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-nestjs-core#readme",
"gitHead": "a2e2b5a1aa2910b903829d215184c43d2107b9ac"
"gitHead": "0af1b70f7c3c9763c85ac51fa5e334c1e1512020"
}

@@ -45,22 +45,26 @@ # OpenTelemetry NestJS Instrumentation for Node.js

| Name | `nestjs.type` | Description | Included attributes
| ---- | ---- | ---- | ----
`Create Nest App` | `app_creation` | Traces the bootup for the Nest App. The `NestFactory(Static).create` call. | `nestjs.module`
`<ControllerName>.<memberName>` | `request_context` | Traces the whole request context. | `http.*`, `nestjs.callback`
`<memberName>` | `handler` | Traces the work of a specific controller member function. | `nestjs.callback`
| Name | `nestjs.type` | Description | Included attributes |
| ---- | ---- | ---- | ---- |
| `Create Nest App` | `app_creation` | Traces the bootup for the Nest App. The `NestFactory(Static).create` call. | `nestjs.module` |
| `<ControllerName>.<memberName>` | `request_context` | Traces the whole request context. | `http.*`, `nestjs.callback` |
| `<memberName>` | `handler` | Traces the work of a specific controller member function. | `nestjs.callback` |
### Attributes
## Semantic Conventions
| Name | Description
| ---- | ----
| `component`* | "@nestjs/core"
| `nestjs.version`* | Version of instrumented `@nestjs/core` package
| `nestjs.type`* | See [NestType](./src/enums/NestType.ts)
| `nestjs.module` | Nest module class name
| `nestjs.controller` | Nest controller class name
| `nestjs.callback` | The function name of the member in the controller
| `http.method` | HTTP method
| `http.url` | Full request URL
| `http.route` | Route assigned to handler. Ex: `/users/:id`
This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md)
Attributes collected:
| Attribute | Short Description |
|---------------------|----------------------------------------------------|
| `component`* | "@nestjs/core" |
| `nestjs.version`* | Version of instrumented `@nestjs/core` package |
| `nestjs.type`* | See [NestType](./src/enums/NestType.ts) |
| `nestjs.module` | Nest module class name |
| `nestjs.controller` | Nest controller class name |
| `nestjs.callback` | The function name of the member in the controller |
| `http.method` | HTTP method |
| `http.url` | Full request URL |
| `http.route` | Route assigned to handler. Ex: `/users/:id` |
\* included in all of the spans.

@@ -83,4 +87,2 @@

[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-nestjs-core.svg
[pkg-repo-url]: https://github.com/nestjs/nest
[pkg-npm-url]: https://www.npmjs.com/package/@nestjs/core
[pkg-web-url]: https://nestjs.com/

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc