@launchdarkly/node-server-sdk-otel 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/LICENSE +1 -1
- package/README.md +3 -13
- package/dist/TracingHook.d.ts +44 -6
- package/dist/TracingHook.d.ts.map +1 -1
- package/dist/TracingHook.js +64 -12
- package/dist/TracingHook.js.map +1 -1
- package/package.json +7 -6
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.0.0](https://github.com/launchdarkly/js-core/compare/node-server-sdk-otel-v0.0.1...node-server-sdk-otel-v1.0.0) (2024-04-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Add OpenTelemetry support for node-server-sdk. ([#401](https://github.com/launchdarkly/js-core/issues/401)) ([daf4939](https://github.com/launchdarkly/js-core/commit/daf4939fdd53c9fe791e828783f809382673d9a5))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* devDependencies
|
|
15
|
+
* @launchdarkly/node-server-sdk bumped from 9.2.4 to 9.3.0
|
|
16
|
+
* peerDependencies
|
|
17
|
+
* @launchdarkly/node-server-sdk bumped from 9.2.4 to 9.3.0
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -4,13 +4,6 @@
|
|
|
4
4
|
[![Actions Status][node-otel-ci-badge]][node-otel-ci]
|
|
5
5
|
[](https://launchdarkly.github.io/js-core/packages/telemetry/node-server-sdk-otel/docs/)
|
|
6
6
|
|
|
7
|
-
# 🚫🚫🚫🚫🚫🚫
|
|
8
|
-
|
|
9
|
-
> [!CAUTION]
|
|
10
|
-
> This package is prerelease and experimental. It should not be used in production and is not supported.
|
|
11
|
-
|
|
12
|
-
This package provides OpenTelemetry integrations for the LaunchDarkly Server-Side SDK for Node.js.
|
|
13
|
-
|
|
14
7
|
## LaunchDarkly overview
|
|
15
8
|
|
|
16
9
|
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today!
|
|
@@ -21,10 +14,6 @@ This package provides OpenTelemetry integrations for the LaunchDarkly Server-Sid
|
|
|
21
14
|
|
|
22
15
|
This package is compatible with Node.js versions 14 and above.
|
|
23
16
|
|
|
24
|
-
## Getting started
|
|
25
|
-
|
|
26
|
-
Refer to [Using Redis as a persistent feature store](https://docs.launchdarkly.com/sdk/features/storing-data/otel#nodejs-server-side).
|
|
27
|
-
|
|
28
17
|
## Quick setup
|
|
29
18
|
|
|
30
19
|
This assumes that you have already installed the LaunchDarkly Node.js SDK.
|
|
@@ -35,7 +24,7 @@ This assumes that you have already installed the LaunchDarkly Node.js SDK.
|
|
|
35
24
|
npm install @launchdarkly/node-server-sdk-otel --save
|
|
36
25
|
```
|
|
37
26
|
|
|
38
|
-
2. If your application does not already have its own dependency on the `@opentelemetry/api` package, add `@opentelemetry/api` as well:
|
|
27
|
+
2. If your application does not already have its' own dependency on the `@opentelemetry/api` package, add `@opentelemetry/api` as well:
|
|
39
28
|
|
|
40
29
|
```shell
|
|
41
30
|
npm install @opentelemetry/api --save
|
|
@@ -65,7 +54,8 @@ We encourage pull requests and other contributions from the community. Check out
|
|
|
65
54
|
- Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
|
|
66
55
|
- Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
|
|
67
56
|
- Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
|
|
68
|
-
- Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan).
|
|
57
|
+
- Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan).
|
|
58
|
+
- Disable parts of your application to facilitate maintenance, without taking everything offline.
|
|
69
59
|
- LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com/sdk) for a complete list.
|
|
70
60
|
- Explore LaunchDarkly
|
|
71
61
|
- [launchdarkly.com](https://www.launchdarkly.com/ 'LaunchDarkly Main Website') for more information
|
package/dist/TracingHook.d.ts
CHANGED
|
@@ -1,22 +1,60 @@
|
|
|
1
|
-
import { integrations, LDEvaluationDetail } from '@launchdarkly/node-server-sdk';
|
|
1
|
+
import { integrations, LDEvaluationDetail, LDLogger } from '@launchdarkly/node-server-sdk';
|
|
2
2
|
/**
|
|
3
3
|
* Options which allow configuring the tracing hook.
|
|
4
4
|
*/
|
|
5
5
|
export interface TracingHookOptions {
|
|
6
6
|
/**
|
|
7
|
-
* If set to true, then the tracing hook will add spans for each variation
|
|
8
|
-
* method call.
|
|
7
|
+
* Experimental: If set to true, then the tracing hook will add spans for each variation
|
|
8
|
+
* method call. Span events are always added and are unaffected by this
|
|
9
|
+
* setting.
|
|
9
10
|
*
|
|
10
11
|
* The default value is false.
|
|
12
|
+
*
|
|
13
|
+
* This feature is experimental and the data in the spans, or nesting of spans,
|
|
14
|
+
* could change in future versions.
|
|
11
15
|
*/
|
|
12
|
-
spans
|
|
16
|
+
spans?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* If set to true, then the tracing hook will add the evaluated flag value
|
|
19
|
+
* to span events and spans.
|
|
20
|
+
*
|
|
21
|
+
* The default is false.
|
|
22
|
+
*/
|
|
23
|
+
includeVariant?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Set to use a custom logging configuration, otherwise the logging will be done
|
|
26
|
+
* using `console`.
|
|
27
|
+
*/
|
|
28
|
+
logger?: LDLogger;
|
|
13
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* The TracingHook adds OpenTelemetry support to the LaunchDarkly SDK.
|
|
32
|
+
*
|
|
33
|
+
* By default, span events will be added for each call to a "Variation" method.
|
|
34
|
+
*
|
|
35
|
+
* The span event will include the canonicalKey of the context, the provider of the evaluation
|
|
36
|
+
* (LaunchDarkly), and the key of the flag being evaluated.
|
|
37
|
+
*/
|
|
14
38
|
export default class TracingHook implements integrations.Hook {
|
|
15
39
|
private readonly options;
|
|
16
40
|
private readonly tracer;
|
|
41
|
+
/**
|
|
42
|
+
* Construct a TracingHook with the given options.
|
|
43
|
+
*
|
|
44
|
+
* @param options Options to customize tracing behavior.
|
|
45
|
+
*/
|
|
17
46
|
constructor(options?: TracingHookOptions);
|
|
47
|
+
/**
|
|
48
|
+
* Get the meta-data for the tracing hook.
|
|
49
|
+
*/
|
|
18
50
|
getMetadata(): integrations.HookMetadata;
|
|
19
|
-
|
|
20
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Implements the "beforeEvaluation" stage of the TracingHook.
|
|
53
|
+
*/
|
|
54
|
+
beforeEvaluation?(hookContext: integrations.EvaluationSeriesContext, data: integrations.EvaluationSeriesData): integrations.EvaluationSeriesData;
|
|
55
|
+
/**
|
|
56
|
+
* Implements the "afterEvaluation" stage of the TracingHook.
|
|
57
|
+
*/
|
|
58
|
+
afterEvaluation?(hookContext: integrations.EvaluationSeriesContext, data: integrations.EvaluationSeriesData, detail: LDEvaluationDetail): integrations.EvaluationSeriesData;
|
|
21
59
|
}
|
|
22
60
|
//# sourceMappingURL=TracingHook.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TracingHook.d.ts","sourceRoot":"","sources":["../src/TracingHook.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"TracingHook.d.ts","sourceRoot":"","sources":["../src/TracingHook.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EAIT,MAAM,+BAA+B,CAAC;AAUvC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAgDD;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,YAAW,YAAY,CAAC,IAAI;IAC3D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;IAC/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0C;IAEjE;;;;OAIG;gBACS,OAAO,CAAC,EAAE,kBAAkB;IAIxC;;OAEG;IACH,WAAW,IAAI,YAAY,CAAC,YAAY;IAMxC;;OAEG;IACH,gBAAgB,CAAC,CACf,WAAW,EAAE,YAAY,CAAC,uBAAuB,EACjD,IAAI,EAAE,YAAY,CAAC,oBAAoB,GACtC,YAAY,CAAC,oBAAoB;IAapC;;OAEG;IACH,eAAe,CAAC,CACd,WAAW,EAAE,YAAY,CAAC,uBAAuB,EACjD,IAAI,EAAE,YAAY,CAAC,oBAAoB,EACvC,MAAM,EAAE,kBAAkB,GACzB,YAAY,CAAC,oBAAoB;CAkBrC"}
|
package/dist/TracingHook.js
CHANGED
|
@@ -6,42 +6,94 @@ const node_server_sdk_1 = require("@launchdarkly/node-server-sdk");
|
|
|
6
6
|
const FEATURE_FLAG_SCOPE = 'feature_flag';
|
|
7
7
|
const FEATURE_FLAG_KEY_ATTR = `${FEATURE_FLAG_SCOPE}.key`;
|
|
8
8
|
const FEATURE_FLAG_PROVIDER_ATTR = `${FEATURE_FLAG_SCOPE}.provider_name`;
|
|
9
|
-
const
|
|
9
|
+
const FEATURE_FLAG_CONTEXT_KEY_ATTR = `${FEATURE_FLAG_SCOPE}.context.key`;
|
|
10
|
+
const FEATURE_FLAG_VARIANT_ATTR = `${FEATURE_FLAG_SCOPE}.variant`;
|
|
11
|
+
const TRACING_HOOK_NAME = 'LaunchDarkly Tracing Hook';
|
|
10
12
|
const defaultOptions = {
|
|
11
13
|
spans: false,
|
|
14
|
+
includeVariant: false,
|
|
15
|
+
logger: (0, node_server_sdk_1.basicLogger)({ name: TRACING_HOOK_NAME }),
|
|
12
16
|
};
|
|
17
|
+
function validateOptions(options) {
|
|
18
|
+
const validatedOptions = Object.assign({}, defaultOptions);
|
|
19
|
+
if ((options === null || options === void 0 ? void 0 : options.logger) !== undefined) {
|
|
20
|
+
validatedOptions.logger = new node_server_sdk_1.SafeLogger(options.logger, defaultOptions.logger);
|
|
21
|
+
}
|
|
22
|
+
if ((options === null || options === void 0 ? void 0 : options.includeVariant) !== undefined) {
|
|
23
|
+
if (node_server_sdk_1.TypeValidators.Boolean.is(options.includeVariant)) {
|
|
24
|
+
validatedOptions.includeVariant = options.includeVariant;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
validatedOptions.logger.error(node_server_sdk_1.OptionMessages.wrongOptionType('includeVariant', 'boolean', typeof (options === null || options === void 0 ? void 0 : options.includeVariant)));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if ((options === null || options === void 0 ? void 0 : options.spans) !== undefined) {
|
|
31
|
+
if (node_server_sdk_1.TypeValidators.Boolean.is(options.spans)) {
|
|
32
|
+
validatedOptions.spans = options.spans;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
validatedOptions.logger.error(node_server_sdk_1.OptionMessages.wrongOptionType('spans', 'boolean', typeof (options === null || options === void 0 ? void 0 : options.spans)));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return validatedOptions;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The TracingHook adds OpenTelemetry support to the LaunchDarkly SDK.
|
|
42
|
+
*
|
|
43
|
+
* By default, span events will be added for each call to a "Variation" method.
|
|
44
|
+
*
|
|
45
|
+
* The span event will include the canonicalKey of the context, the provider of the evaluation
|
|
46
|
+
* (LaunchDarkly), and the key of the flag being evaluated.
|
|
47
|
+
*/
|
|
13
48
|
class TracingHook {
|
|
49
|
+
/**
|
|
50
|
+
* Construct a TracingHook with the given options.
|
|
51
|
+
*
|
|
52
|
+
* @param options Options to customize tracing behavior.
|
|
53
|
+
*/
|
|
14
54
|
constructor(options) {
|
|
15
55
|
this.tracer = api_1.trace.getTracer('launchdarkly-client');
|
|
16
|
-
|
|
17
|
-
this.options = Object.assign(Object.assign({}, defaultOptions), (options !== null && options !== void 0 ? options : {}));
|
|
56
|
+
this.options = validateOptions(options);
|
|
18
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Get the meta-data for the tracing hook.
|
|
60
|
+
*/
|
|
19
61
|
getMetadata() {
|
|
20
62
|
return {
|
|
21
|
-
name:
|
|
63
|
+
name: TRACING_HOOK_NAME,
|
|
22
64
|
};
|
|
23
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Implements the "beforeEvaluation" stage of the TracingHook.
|
|
68
|
+
*/
|
|
24
69
|
beforeEvaluation(hookContext, data) {
|
|
25
70
|
if (this.options.spans) {
|
|
26
71
|
const { canonicalKey } = node_server_sdk_1.Context.fromLDContext(hookContext.context);
|
|
27
72
|
const span = this.tracer.startSpan(hookContext.method, undefined, api_1.context.active());
|
|
28
73
|
span.setAttribute('feature_flag.context.key', canonicalKey);
|
|
29
|
-
span.setAttribute('feature_flag.key', hookContext.
|
|
74
|
+
span.setAttribute('feature_flag.key', hookContext.flagKey);
|
|
30
75
|
return Object.assign(Object.assign({}, data), { span });
|
|
31
76
|
}
|
|
32
77
|
return data;
|
|
33
78
|
}
|
|
34
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Implements the "afterEvaluation" stage of the TracingHook.
|
|
81
|
+
*/
|
|
82
|
+
afterEvaluation(hookContext, data, detail) {
|
|
35
83
|
var _a;
|
|
84
|
+
(_a = data.span) === null || _a === void 0 ? void 0 : _a.end();
|
|
36
85
|
const currentTrace = api_1.trace.getActiveSpan();
|
|
37
86
|
if (currentTrace) {
|
|
38
|
-
|
|
39
|
-
[FEATURE_FLAG_KEY_ATTR]: hookContext.
|
|
40
|
-
[FEATURE_FLAG_PROVIDER_ATTR]:
|
|
41
|
-
[
|
|
42
|
-
}
|
|
87
|
+
const eventAttributes = {
|
|
88
|
+
[FEATURE_FLAG_KEY_ATTR]: hookContext.flagKey,
|
|
89
|
+
[FEATURE_FLAG_PROVIDER_ATTR]: 'LaunchDarkly',
|
|
90
|
+
[FEATURE_FLAG_CONTEXT_KEY_ATTR]: node_server_sdk_1.Context.fromLDContext(hookContext.context).canonicalKey,
|
|
91
|
+
};
|
|
92
|
+
if (this.options.includeVariant) {
|
|
93
|
+
eventAttributes[FEATURE_FLAG_VARIANT_ATTR] = JSON.stringify(detail.value);
|
|
94
|
+
}
|
|
95
|
+
currentTrace.addEvent(FEATURE_FLAG_SCOPE, eventAttributes);
|
|
43
96
|
}
|
|
44
|
-
(_a = data.span) === null || _a === void 0 ? void 0 : _a.end();
|
|
45
97
|
return data;
|
|
46
98
|
}
|
|
47
99
|
}
|
package/dist/TracingHook.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TracingHook.js","sourceRoot":"","sources":["../src/TracingHook.ts"],"names":[],"mappings":";;AAAA,gDAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"TracingHook.js","sourceRoot":"","sources":["../src/TracingHook.ts"],"names":[],"mappings":";;AAAA,gDAAgD;AAChD,4CAAsE;AAEtE,mEASuC;AAEvC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAC1C,MAAM,qBAAqB,GAAG,GAAG,kBAAkB,MAAM,CAAC;AAC1D,MAAM,0BAA0B,GAAG,GAAG,kBAAkB,gBAAgB,CAAC;AACzE,MAAM,6BAA6B,GAAG,GAAG,kBAAkB,cAAc,CAAC;AAC1E,MAAM,yBAAyB,GAAG,GAAG,kBAAkB,UAAU,CAAC;AAElE,MAAM,iBAAiB,GAAG,2BAA2B,CAAC;AA2CtD,MAAM,cAAc,GAAyB;IAC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AAC,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,YAAY;aACzF,CAAC;YACF,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;gBAC/B,eAAe,CAAC,yBAAyB,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;aAC3E;YACD,YAAY,CAAC,QAAQ,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;SAC5D;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlED,8BAkEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@launchdarkly/node-server-sdk-otel",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -23,20 +23,21 @@
|
|
|
23
23
|
"test": "npx jest --ci",
|
|
24
24
|
"build": "npx tsc",
|
|
25
25
|
"clean": "npx tsc --build --clean",
|
|
26
|
-
"lint": "npx eslint . --ext .ts",
|
|
27
|
-
"lint:fix": "yarn run lint -- --fix",
|
|
28
26
|
"prettier": "prettier --write 'src/*.@(js|ts|tsx|json)'",
|
|
29
|
-
"check": "yarn && yarn prettier && yarn lint && tsc && yarn test"
|
|
27
|
+
"check": "yarn && yarn prettier && yarn lint && tsc && yarn test",
|
|
28
|
+
"lint": "npx eslint . --ext .ts"
|
|
30
29
|
},
|
|
31
30
|
"license": "Apache-2.0",
|
|
32
31
|
"peerDependencies": {
|
|
33
|
-
"@launchdarkly/node-server-sdk": "9.3.0
|
|
32
|
+
"@launchdarkly/node-server-sdk": "9.3.0",
|
|
34
33
|
"@opentelemetry/api": ">=1.3.0"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
|
-
"@launchdarkly/node-server-sdk": "9.3.0
|
|
36
|
+
"@launchdarkly/node-server-sdk": "9.3.0",
|
|
38
37
|
"@launchdarkly/private-js-mocks": "0.0.1",
|
|
39
38
|
"@opentelemetry/api": ">=1.3.0",
|
|
39
|
+
"@opentelemetry/sdk-node": "0.49.1",
|
|
40
|
+
"@opentelemetry/sdk-trace-node": "1.22.0",
|
|
40
41
|
"@testing-library/dom": "^9.3.1",
|
|
41
42
|
"@testing-library/jest-dom": "^5.16.5",
|
|
42
43
|
"@types/jest": "^29.5.3",
|