From 877e348e2103981b4e032eaf6c3a6cc40bb1e483 Mon Sep 17 00:00:00 2001 From: bob-potter-sp <79337340+bob-potter-sp@users.noreply.github.com> Date: Wed, 24 May 2023 10:09:23 -0500 Subject: [PATCH] [WIP] Tracing --- lib/handler.ts | 3 +++ package-lock.json | 14 ++++++++++++++ package.json | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/handler.ts b/lib/handler.ts index 3e72bf0..c3a9f13 100644 --- a/lib/handler.ts +++ b/lib/handler.ts @@ -27,6 +27,8 @@ import { StdAccountListInput } from './commands' import { Response } from './response' +import { Tracer } from "@opentelemetry/api"; + /** * Connector context object @@ -38,6 +40,7 @@ export interface Context { invocationId?: string requestId?: string commandType?: string + tracer?: Tracer, [prop: string]: any } diff --git a/package-lock.json b/package-lock.json index 09b0a42..700e7c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "license": "Copyright (c) 2023. SailPoint Technologies, Inc. All rights reserved.", "dependencies": { + "@opentelemetry/api": "^1.4.1", "archiver": "^5.3.1", "express": "^4.17.1", "pino": "^8.5.0" @@ -969,6 +970,14 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@opentelemetry/api": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.4.1.tgz", + "integrity": "sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA==", + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/@sinclair/typebox": { "version": "0.23.5", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.5.tgz", @@ -5572,6 +5581,11 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@opentelemetry/api": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.4.1.tgz", + "integrity": "sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA==" + }, "@sinclair/typebox": { "version": "0.23.5", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.5.tgz", diff --git a/package.json b/package.json index 4e6cada..0dcb5aa 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "prepare": "npm run build" }, "dependencies": { + "@opentelemetry/api": "^1.4.1", "archiver": "^5.3.1", "express": "^4.17.1", "pino": "^8.5.0" @@ -65,7 +66,7 @@ "statements": 88, "branches": 88, "functions": 88, - "lines": 88 + "lines": 88 } } },