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

@opentelemetry/instrumentation-hapi

Package Overview
Dependencies
Maintainers
4
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/instrumentation-hapi - npm Package Compare versions

Comparing version 0.23.0 to 0.24.0

build/src/enums/AttributeNames.js.map

7

build/src/instrumentation.js

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

const api = require("@opentelemetry/api");
const core_1 = require("@opentelemetry/core");
const instrumentation_1 = require("@opentelemetry/instrumentation");

@@ -262,2 +263,8 @@ const version_1 = require("./version");

}
const rpcMetadata = core_1.getRPCMetadata(api.context.active());
if ((rpcMetadata === null || rpcMetadata === void 0 ? void 0 : rpcMetadata.type) === core_1.RPCType.HTTP) {
const rootSpanMetadata = utils_1.getRootSpanMetadata(route);
rpcMetadata.span.updateName(rootSpanMetadata.name);
rpcMetadata.span.setAttributes(rootSpanMetadata.attributes);
}
const metadata = utils_1.getRouteMetadata(route, pluginName);

@@ -264,0 +271,0 @@ const span = instrumentation.tracer.startSpan(metadata.name, {

4

build/src/utils.d.ts

@@ -13,2 +13,6 @@ import { SpanAttributes } from '@opentelemetry/api';

};
export declare const getRootSpanMetadata: (route: Hapi.ServerRoute) => {
attributes: SpanAttributes;
name: string;
};
export declare const getExtMetadata: (extPoint: Hapi.ServerRequestExtType, pluginName?: string | undefined) => {

@@ -15,0 +19,0 @@ attributes: SpanAttributes;

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.getExtMetadata = exports.getRouteMetadata = exports.isPatchableExtMethod = exports.isDirectExtInput = exports.isLifecycleExtEventObj = exports.isLifecycleExtType = exports.getPluginName = void 0;
exports.getExtMetadata = exports.getRootSpanMetadata = exports.getRouteMetadata = exports.isPatchableExtMethod = exports.isDirectExtInput = exports.isLifecycleExtEventObj = exports.isLifecycleExtType = exports.getPluginName = void 0;
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");

@@ -76,2 +76,11 @@ const types_1 = require("./types");

exports.getRouteMetadata = getRouteMetadata;
const getRootSpanMetadata = (route) => {
return {
attributes: {
[semantic_conventions_1.SemanticAttributes.HTTP_ROUTE]: route.path,
},
name: `${route.method} ${route.path}`,
};
};
exports.getRootSpanMetadata = getRootSpanMetadata;
const getExtMetadata = (extPoint, pluginName) => {

@@ -78,0 +87,0 @@ if (pluginName) {

2

build/src/version.d.ts

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

export declare const VERSION = "0.23.0";
export declare const VERSION = "0.24.0";
//# sourceMappingURL=version.d.ts.map

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

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

@@ -35,2 +35,3 @@ "main": "build/src/index.js",

"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",

@@ -50,8 +51,8 @@ "doc",

"@opentelemetry/api": "1.0.1",
"@opentelemetry/context-async-hooks": "0.23.0",
"@opentelemetry/node": "0.23.0",
"@opentelemetry/tracing": "0.23.0",
"@opentelemetry/context-async-hooks": "0.24.0",
"@opentelemetry/node": "0.24.0",
"@opentelemetry/tracing": "0.24.0",
"@types/mocha": "7.0.2",
"@types/node": "14.17.4",
"codecov": "3.8.2",
"@types/node": "14.17.5",
"codecov": "3.8.3",
"gts": "3.1.0",

@@ -66,7 +67,8 @@ "mocha": "7.2.0",

"dependencies": {
"@opentelemetry/instrumentation": "^0.23.0",
"@opentelemetry/semantic-conventions": "^0.23.0",
"@types/hapi__hapi": "20.0.8"
"@opentelemetry/core": "^0.24.0",
"@opentelemetry/instrumentation": "^0.24.0",
"@opentelemetry/semantic-conventions": "^0.24.0",
"@types/hapi__hapi": "20.0.9"
},
"gitHead": "eea5f3ef0382c3c8f6d5aca796e3babf7ad4a6c8"
"gitHead": "e4757035a7b4012703a98b5609b8ac0f859e9726"
}
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