@pristine-ts/aws-xray 2.0.1 → 2.0.3

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.
@@ -2,13 +2,20 @@ import { TracerInterface } from "@pristine-ts/telemetry";
2
2
  import { Readable } from "stream";
3
3
  import { LogHandlerInterface } from "@pristine-ts/logging";
4
4
  /**
5
- * Tracer to be able to dump Pristine traces to AWS Xray
5
+ * Tracer to be able to dump Pristine traces to AWS X-Ray.
6
+ *
7
+ * The tracer is **always constructed** when `@pristine-ts/aws-xray` is in the import
8
+ * graph — that's a structural requirement of the framework's tracer registration. To
9
+ * disable export without removing the package, set the `pristine.aws-xray.activated`
10
+ * configuration to `false` (or `PRISTINE_AWS_XRAY_ACTIVATED=false`). When deactivated,
11
+ * the stream listener early-returns and the AWS X-Ray SDK is never touched.
6
12
  */
7
13
  export declare class XrayTracer implements TracerInterface {
8
14
  private readonly debug;
15
+ private readonly activated;
9
16
  private readonly loghandler;
10
17
  traceEndedStream: Readable;
11
- constructor(debug: boolean, loghandler: LogHandlerInterface);
18
+ constructor(debug: boolean, activated: boolean, loghandler: LogHandlerInterface);
12
19
  /**
13
20
  * This method is called when the trace ends.
14
21
  * @param trace
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pristine-ts/aws-xray",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "",
5
5
  "module": "dist/lib/esm/aws-xray.module.js",
6
6
  "main": "dist/lib/cjs/aws-xray.module.js",
@@ -20,9 +20,9 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@pristine-ts/common": "^2.0.1",
24
- "@pristine-ts/logging": "^2.0.1",
25
- "@pristine-ts/telemetry": "^2.0.1",
23
+ "@pristine-ts/common": "^2.0.3",
24
+ "@pristine-ts/logging": "^2.0.3",
25
+ "@pristine-ts/telemetry": "^2.0.3",
26
26
  "aws-xray-sdk": "^3.5.3"
27
27
  },
28
28
  "jest": {
@@ -59,7 +59,7 @@
59
59
  "src/*.{js,ts}"
60
60
  ]
61
61
  },
62
- "gitHead": "a5e40ea0fcdeaf743666c1981a9315bfde9c4c00",
62
+ "gitHead": "c741bb430ab8f6286068dc3870fcadf4cefd0023",
63
63
  "repository": {
64
64
  "type": "git",
65
65
  "url": "https://github.com/magieno/pristine-ts.git",