Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

opentelemetry-instrumentation-express

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opentelemetry-instrumentation-express - npm Package Compare versions

Comparing version 0.4.4 to 0.4.5

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.4.5](https://github.com/aspecto-io/opentelemetry-ext-js/compare/opentelemetry-instrumentation-express@0.4.4...opentelemetry-instrumentation-express@0.4.5) (2021-05-31)
**Note:** Version bump only for package opentelemetry-instrumentation-express
## [0.4.4](https://github.com/aspecto-io/opentelemetry-ext-js/compare/opentelemetry-instrumentation-express@0.4.3...opentelemetry-instrumentation-express@0.4.4) (2021-05-19)

@@ -8,0 +16,0 @@

3

dist/src/express.js

@@ -5,3 +5,2 @@ "use strict";

const api_1 = require("@opentelemetry/api");
const instrumentation_http_1 = require("@opentelemetry/instrumentation-http");
const types_1 = require("./types");

@@ -167,3 +166,3 @@ const version_1 = require("./version");

}
span.setStatus(instrumentation_http_1.parseResponseStatus(res.statusCode));
span.setStatus(attributes_1.parseResponseStatus(res.statusCode));
const newSpanName = attributes_1.getSpanNameOnResEnd(req, routeState);

@@ -170,0 +169,0 @@ if (newSpanName) {

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

import { SpanAttributes } from '@opentelemetry/api';
import { SpanAttributes, SpanStatus } from '@opentelemetry/api';
import { ExpressConsumedRouteState } from '../types';

@@ -12,2 +12,3 @@ import type express from 'express';

export declare const getHttpSpanAttributesFromReq: (req: express.Request) => SpanAttributes;
export declare const parseResponseStatus: (statusCode: number) => Omit<SpanStatus, 'message'>;
//# sourceMappingURL=attributes.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getHttpSpanAttributesFromReq = exports.createHostAttribute = exports.getSpanInitialName = exports.getSpanNameOnResEnd = exports.getHttpSpanAttributeFromRes = exports.getResolvedRoute = exports.getFullRoute = exports.getRouteAttributes = void 0;
exports.parseResponseStatus = exports.getHttpSpanAttributesFromReq = exports.createHostAttribute = exports.getSpanInitialName = exports.getSpanNameOnResEnd = exports.getHttpSpanAttributeFromRes = exports.getResolvedRoute = exports.getFullRoute = exports.getRouteAttributes = void 0;
const api_1 = require("@opentelemetry/api");
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");

@@ -82,2 +83,12 @@ const types_1 = require("../types");

};
// from @opentelemetry/instrumentation-http
// https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-instrumentation-http/src/utils.ts#L70
exports.parseResponseStatus = (statusCode) => {
// 1xx, 2xx, 3xx are OK
if (statusCode >= 100 && statusCode < 400) {
return { code: api_1.SpanStatusCode.OK };
}
// All other codes are error
return { code: api_1.SpanStatusCode.ERROR };
};
//# sourceMappingURL=attributes.js.map

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

export declare const VERSION = "0.4.4";
export declare const VERSION = "0.4.5";
//# sourceMappingURL=version.d.ts.map

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

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.4.4';
exports.VERSION = '0.4.5';
//# sourceMappingURL=version.js.map
{
"name": "opentelemetry-instrumentation-express",
"version": "0.4.4",
"version": "0.4.5",
"description": "enhanced open telemetry instrumentation for the `express` web framework",

@@ -46,3 +46,3 @@ "author": "Aspecto.io",

"express": "4.17.1",
"mocha": "^8.3.2",
"mocha": "^8.4.0",
"test-all-versions": "^5.0.1"

@@ -57,3 +57,3 @@ },

},
"gitHead": "61891435509330061efea9e3ffcdf34b80a584a9"
"gitHead": "0ffb67e586f78c6b091b3af5fad8656fde819202"
}
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