@jini-ai/diagnostics 0.6.15 → 0.6.16
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
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @jini-ai/diagnostics
|
|
2
2
|
|
|
3
|
+
## 0.6.16
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add a pure host-fact policy for outbound observability and require explicit export eligibility in
|
|
8
|
+
Sentry and OpenTelemetry provider factory options. Denied runtimes retain local admission while
|
|
9
|
+
Sentry events, spans, native crash uploads and OTLP trace/metric export stay off. Consent remains
|
|
10
|
+
independent. Hosts must supply the policy decision; rebuild and replace installed provider artifacts.
|
|
11
|
+
|
|
12
|
+
Migration: Hosts must now pass `exportEnabled: true` in provider factory options to permit export.
|
|
13
|
+
|
|
3
14
|
## 0.6.13
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Host-supplied evidence for outbound observability; independent of labels, DSNs and consent. */
|
|
2
|
+
export interface ObservabilityExportFacts {
|
|
3
|
+
readonly forceEnable?: boolean;
|
|
4
|
+
readonly development?: boolean;
|
|
5
|
+
readonly packagedDesktop?: boolean;
|
|
6
|
+
readonly deployedProduction?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Decide export eligibility without I/O. A debugging override never supplies user consent.
|
|
9
|
+
* @param facts Launch evidence interpreted by the host, never by a provider's saved settings.
|
|
10
|
+
* @returns False for development or missing evidence; known development beats production hints.
|
|
11
|
+
* @example observabilityExportAllowed({ packagedDesktop: true });
|
|
12
|
+
* @complexity O(1) time and space; no effects or thrown errors for typed inputs.
|
|
13
|
+
*/
|
|
14
|
+
export declare function observabilityExportAllowed(facts: ObservabilityExportFacts, _options?: Record<string, never>): boolean;
|
|
15
|
+
//# sourceMappingURL=export-policy.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Decide export eligibility without I/O. A debugging override never supplies user consent.
|
|
2
|
+
* @param facts Launch evidence interpreted by the host, never by a provider's saved settings.
|
|
3
|
+
* @returns False for development or missing evidence; known development beats production hints.
|
|
4
|
+
* @example observabilityExportAllowed({ packagedDesktop: true });
|
|
5
|
+
* @complexity O(1) time and space; no effects or thrown errors for typed inputs.
|
|
6
|
+
*/
|
|
7
|
+
export function observabilityExportAllowed(facts, _options = {}) {
|
|
8
|
+
if (facts.forceEnable === true)
|
|
9
|
+
return true;
|
|
10
|
+
if (facts.development === true)
|
|
11
|
+
return false;
|
|
12
|
+
return facts.packagedDesktop === true || facts.deployedProduction === true;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=export-policy.js.map
|
|
@@ -2,6 +2,7 @@ import type { ObservabilityConfig } from './config.js';
|
|
|
2
2
|
import type { ExporterFactory, TracerProviderFactory, ObservabilityPort } from './ports.js';
|
|
3
3
|
import { type OtelAdapterOptions } from './otel.js';
|
|
4
4
|
export * from './config.js';
|
|
5
|
+
export * from './export-policy.js';
|
|
5
6
|
export * from './ports.js';
|
|
6
7
|
export * from './noop.js';
|
|
7
8
|
export * from './otel.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createNoopObservabilityPort } from './noop.js';
|
|
2
2
|
import { createOtelObservabilityPort } from './otel.js';
|
|
3
3
|
export * from './config.js';
|
|
4
|
+
export * from './export-policy.js';
|
|
4
5
|
export * from './ports.js';
|
|
5
6
|
export * from './noop.js';
|
|
6
7
|
export * from './otel.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/diagnostics",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.16",
|
|
4
4
|
"description": "Diagnostics-bundle tooling: JSON/text secret redaction, log-source collection, manifest building, and zip packaging for support exports.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -82,20 +82,13 @@
|
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@vitest/coverage-v8": "^2.1.9",
|
|
84
84
|
"jszip": "^3.10.1",
|
|
85
|
-
"@jini-ai/
|
|
86
|
-
"@jini-ai/
|
|
85
|
+
"@jini-ai/core": "^0.6.16",
|
|
86
|
+
"@jini-ai/analytics": "^0.6.16"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"js-tokens": "^9.0.1",
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
"peerDependencies": {
|
|
93
|
-
"jszip": "^3.10.1"
|
|
94
|
-
},
|
|
95
|
-
"peerDependenciesMeta": {
|
|
96
|
-
"jszip": {
|
|
97
|
-
"optional": true
|
|
98
|
-
}
|
|
90
|
+
"jszip": "^3.10.1",
|
|
91
|
+
"@jini-ai/core": "^0.6.16"
|
|
99
92
|
},
|
|
100
93
|
"scripts": {
|
|
101
94
|
"build": "tsc -p tsconfig.json",
|