Socket
Socket
Sign inDemoInstall

@opentelemetry/instrumentation-restify

Package Overview
Dependencies
Maintainers
3
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/instrumentation-restify - npm Package Compare versions

Comparing version 0.37.0 to 0.38.0

4

build/src/instrumentation.d.ts
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
import type { RestifyInstrumentationConfig } from './types';
export declare class RestifyInstrumentation extends InstrumentationBase<any> {
export declare class RestifyInstrumentation extends InstrumentationBase {
constructor(config?: RestifyInstrumentationConfig);

@@ -9,3 +9,3 @@ private _moduleVersion?;

getConfig(): RestifyInstrumentationConfig;
init(): InstrumentationNodeModuleDefinition<any>;
init(): InstrumentationNodeModuleDefinition;
private _middlewarePatcher;

@@ -12,0 +12,0 @@ private _methodPatcher;

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

const types_1 = require("./types");
const AttributeNames = require("./enums/AttributeNames");
const AttributeNames_1 = require("./enums/AttributeNames");
const version_1 = require("./version");

@@ -29,3 +29,2 @@ const constants = require("./constants");

const core_1 = require("@opentelemetry/core");
const { diag } = api;
class RestifyInstrumentation extends instrumentation_1.InstrumentationBase {

@@ -47,4 +46,3 @@ constructor(config = {}) {

});
module.files.push(new instrumentation_1.InstrumentationNodeModuleFile('restify/lib/server.js', constants.SUPPORTED_VERSIONS, (moduleExports, moduleVersion) => {
diag.debug(`Applying patch for ${constants.MODULE_NAME}@${moduleVersion}`);
module.files.push(new instrumentation_1.InstrumentationNodeModuleFile('restify/lib/server.js', constants.SUPPORTED_VERSIONS, moduleExports => {
this._isDisabled = false;

@@ -65,4 +63,3 @@ const Server = moduleExports;

return moduleExports;
}, (moduleExports, moduleVersion) => {
diag.debug(`Removing patch for ${constants.MODULE_NAME}@${moduleVersion}`);
}, moduleExports => {
this._isDisabled = true;

@@ -117,7 +114,7 @@ if (moduleExports) {

const attributes = {
[AttributeNames.AttributeNames.NAME]: fnName,
[AttributeNames.AttributeNames.VERSION]: this._moduleVersion || 'n/a',
[AttributeNames.AttributeNames.TYPE]: metadata.type,
[AttributeNames.AttributeNames.METHOD]: metadata.methodName,
[semantic_conventions_1.SemanticAttributes.HTTP_ROUTE]: route,
[AttributeNames_1.AttributeNames.NAME]: fnName,
[AttributeNames_1.AttributeNames.VERSION]: this._moduleVersion || 'n/a',
[AttributeNames_1.AttributeNames.TYPE]: metadata.type,
[AttributeNames_1.AttributeNames.METHOD]: metadata.methodName,
[semantic_conventions_1.SEMATTRS_HTTP_ROUTE]: route,
};

@@ -124,0 +121,0 @@ const span = this.tracer.startSpan(spanName, {

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

export declare const VERSION = "0.37.0";
export declare const VERSION = "0.38.0";
//# sourceMappingURL=version.d.ts.map

@@ -20,3 +20,3 @@ "use strict";

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.37.0';
exports.VERSION = '0.38.0';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/instrumentation-restify",
"version": "0.37.0",
"version": "0.38.0",
"description": "OpenTelemetry restify automatic instrumentation package",

@@ -65,7 +65,7 @@ "main": "build/src/index.js",

"@opentelemetry/core": "^1.8.0",
"@opentelemetry/instrumentation": "^0.50.0",
"@opentelemetry/semantic-conventions": "^1.0.0"
"@opentelemetry/instrumentation": "^0.51.0",
"@opentelemetry/semantic-conventions": "^1.22.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-restify#readme",
"gitHead": "17a0bc1da3baa472ba9b867eee3c60730cc130fb"
"gitHead": "96a87b48934f0afcf1fe637eed6704f35bd8e973"
}

@@ -65,2 +65,12 @@ # OpenTelemetry Restify Instrumentation for Node.js

## Semantic Conventions
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 |
| ------------ | ---------------------------------- |
| `http.route` | The matched route (path template). |
## Useful links

@@ -67,0 +77,0 @@

Sorry, the diff of this file is not supported yet

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