@bleedingdev/modern-js-server-runtime-extensions 3.8.3-ultramodern.6 → 3.9.0-ultramodern.10
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/README.md +5 -5
- package/dist/cjs/bff-policy/crossProjectPolicy.js +299 -0
- package/dist/cjs/bff-policy/index.js +62 -0
- package/dist/cjs/bff-policy/node.js +69 -0
- package/dist/cjs/bff-policy/operationContracts.js +182 -0
- package/dist/cjs/bff-policy/resolveCrossProjectPolicy.js +65 -0
- package/dist/cjs/contract-gate-snapshot-store/http-store.js +1 -8
- package/dist/cjs/errorResponsePlugin.js +57 -0
- package/dist/cjs/localisedLoaderPlugin.js +62 -0
- package/dist/cjs/mfCache.js +6 -0
- package/dist/cjs/module-federation-css/plugin.js +6 -0
- package/dist/cjs/serverConfig.js +18 -0
- package/dist/cjs/serverPlugin.js +74 -0
- package/dist/cjs/static-serving/plugin.js +57 -0
- package/dist/cjs/static-serving/responders.js +158 -0
- package/dist/cjs/static-serving/staticModuleFederation.js +173 -0
- package/dist/cjs/static-serving/staticPrecompressed.js +152 -0
- package/dist/cjs/telemetry/exporters.js +4 -4
- package/dist/cjs/telemetry/healthSetup.js +14 -14
- package/dist/cjs/telemetry/lifecycle.js +20 -21
- package/dist/cjs/telemetry/plugin.js +10 -4
- package/dist/cjs/telemetry/runtimeEndpoints.js +3 -2
- package/dist/cjs/telemetryCore.js +5 -5
- package/dist/esm/bff-policy/crossProjectPolicy.mjs +249 -0
- package/dist/esm/bff-policy/index.mjs +1 -0
- package/dist/esm/contract-gate-snapshot-store/http-store.mjs +1 -8
- package/dist/esm/errorResponsePlugin.mjs +19 -0
- package/dist/esm/localisedLoaderPlugin.mjs +24 -0
- package/dist/esm/mfCache.mjs +6 -0
- package/dist/esm/module-federation-css/plugin.mjs +6 -0
- package/dist/esm/serverConfig.mjs +0 -0
- package/dist/esm/serverPlugin.mjs +34 -0
- package/dist/esm/telemetry/exporters.mjs +2 -2
- package/dist/esm/telemetry/healthSetup.mjs +14 -14
- package/dist/esm/telemetry/lifecycle.mjs +21 -22
- package/dist/esm/telemetry/plugin.mjs +9 -3
- package/dist/esm/telemetry/runtimeEndpoints.mjs +3 -2
- package/dist/esm/telemetryCore.mjs +1 -1
- package/dist/esm-node/bff-policy/crossProjectPolicy.mjs +250 -0
- package/dist/esm-node/bff-policy/index.mjs +2 -0
- package/dist/esm-node/bff-policy/node.mjs +3 -0
- package/dist/esm-node/bff-policy/operationContracts.mjs +129 -0
- package/dist/esm-node/bff-policy/resolveCrossProjectPolicy.mjs +28 -0
- package/dist/esm-node/contract-gate-snapshot-store/http-store.mjs +1 -8
- package/dist/esm-node/errorResponsePlugin.mjs +20 -0
- package/dist/esm-node/localisedLoaderPlugin.mjs +25 -0
- package/dist/esm-node/mfCache.mjs +6 -0
- package/dist/esm-node/module-federation-css/plugin.mjs +6 -0
- package/dist/esm-node/serverConfig.mjs +1 -0
- package/dist/esm-node/serverPlugin.mjs +35 -0
- package/dist/esm-node/static-serving/plugin.mjs +18 -0
- package/dist/esm-node/static-serving/responders.mjs +111 -0
- package/dist/esm-node/static-serving/staticModuleFederation.mjs +105 -0
- package/dist/esm-node/static-serving/staticPrecompressed.mjs +112 -0
- package/dist/esm-node/telemetry/exporters.mjs +2 -2
- package/dist/esm-node/telemetry/healthSetup.mjs +14 -14
- package/dist/esm-node/telemetry/lifecycle.mjs +21 -22
- package/dist/esm-node/telemetry/plugin.mjs +9 -3
- package/dist/esm-node/telemetry/runtimeEndpoints.mjs +3 -2
- package/dist/esm-node/telemetryCore.mjs +1 -1
- package/dist/types/backend-federation-security/node.d.ts +1 -1
- package/dist/types/bff-policy/crossProjectPolicy.d.ts +101 -0
- package/dist/types/bff-policy/index.d.ts +1 -0
- package/dist/types/bff-policy/node.d.ts +2 -0
- package/dist/types/bff-policy/operationContracts.d.ts +85 -0
- package/dist/types/bff-policy/resolveCrossProjectPolicy.d.ts +39 -0
- package/dist/types/contract-gate-snapshot-normalization.d.ts +1 -1
- package/dist/types/contract-gate-snapshot-store/file-store.d.ts +1 -1
- package/dist/types/contract-gate-snapshot-store/http-store.d.ts +1 -1
- package/dist/types/contract-gate-snapshot-store/index.d.ts +5 -5
- package/dist/types/contract-gate-snapshot-store/resolve.d.ts +1 -1
- package/dist/types/contractGateSnapshotObserver.d.ts +2 -2
- package/dist/types/errorResponsePlugin.d.ts +3 -0
- package/dist/types/index.d.ts +8 -7
- package/dist/types/localisedLoaderPlugin.d.ts +2 -0
- package/dist/types/mfCache.d.ts +2 -3
- package/dist/types/module-federation-css/collector.d.ts +1 -1
- package/dist/types/module-federation-css/index.d.ts +8 -8
- package/dist/types/module-federation-css/plugin.d.ts +2 -3
- package/dist/types/runtime-fallback-signal/index.d.ts +4 -4
- package/dist/types/runtime-fallback-signal/model.d.ts +1 -1
- package/dist/types/runtime-fallback-signal/resolver.d.ts +1 -1
- package/dist/types/runtime-fallback-signal/store.d.ts +1 -1
- package/dist/types/runtimeFallbackSignal.d.ts +1 -1
- package/dist/types/serverConfig.d.ts +17 -0
- package/dist/types/serverPlugin.d.ts +5 -0
- package/dist/types/static-serving/plugin.d.ts +3 -0
- package/dist/types/static-serving/responders.d.ts +2 -0
- package/dist/types/static-serving/staticModuleFederation.d.ts +13 -0
- package/dist/types/static-serving/staticPrecompressed.d.ts +13 -0
- package/dist/types/telemetry/exporters.d.ts +2 -2
- package/dist/types/telemetry/healthEvaluation.d.ts +2 -2
- package/dist/types/telemetry/healthMonitor.d.ts +2 -2
- package/dist/types/telemetry/healthSetup.d.ts +6 -6
- package/dist/types/telemetry/lifecycle.d.ts +6 -6
- package/dist/types/telemetry/metrics.d.ts +1 -1
- package/dist/types/telemetry/plugin.d.ts +5 -4
- package/dist/types/telemetry/registry.d.ts +2 -2
- package/dist/types/telemetry/runtimeEndpoints.d.ts +2 -2
- package/dist/types/telemetry.d.ts +1 -1
- package/dist/types/telemetryCore.d.ts +6 -6
- package/dist/types-esm/backend-federation-security/index.d.mts +68 -0
- package/dist/types-esm/backend-federation-security/node.d.mts +3 -0
- package/dist/types-esm/bff-policy/crossProjectPolicy.d.mts +101 -0
- package/dist/types-esm/bff-policy/index.d.mts +1 -0
- package/dist/types-esm/bff-policy/node.d.mts +2 -0
- package/dist/types-esm/bff-policy/operationContracts.d.mts +85 -0
- package/dist/types-esm/bff-policy/resolveCrossProjectPolicy.d.mts +39 -0
- package/dist/types-esm/contract-gate-snapshot-normalization.d.mts +15 -0
- package/dist/types-esm/contract-gate-snapshot-store/file-store.d.mts +3 -0
- package/dist/types-esm/contract-gate-snapshot-store/http-store.d.mts +5 -0
- package/dist/types-esm/contract-gate-snapshot-store/index.d.mts +5 -0
- package/dist/types-esm/contract-gate-snapshot-store/resolve.d.mts +9 -0
- package/dist/types-esm/contract-gate-snapshot-store/types.d.mts +47 -0
- package/dist/types-esm/contractGateSnapshotObserver.d.mts +33 -0
- package/dist/types-esm/env.d.mts +40 -0
- package/dist/types-esm/errorResponsePlugin.d.mts +3 -0
- package/dist/types-esm/index.d.mts +8 -0
- package/dist/types-esm/localisedLoaderPlugin.d.mts +2 -0
- package/dist/types-esm/mfCache.d.mts +26 -0
- package/dist/types-esm/module-federation-css/collector.d.mts +25 -0
- package/dist/types-esm/module-federation-css/index.d.mts +8 -0
- package/dist/types-esm/module-federation-css/manifest.d.mts +28 -0
- package/dist/types-esm/module-federation-css/plugin.d.mts +22 -0
- package/dist/types-esm/module-federation-css/remote.d.mts +20 -0
- package/dist/types-esm/runtime-fallback-signal/index.d.mts +4 -0
- package/dist/types-esm/runtime-fallback-signal/model.d.mts +70 -0
- package/dist/types-esm/runtime-fallback-signal/resolver.d.mts +29 -0
- package/dist/types-esm/runtime-fallback-signal/store.d.mts +4 -0
- package/dist/types-esm/runtimeFallbackSignal.d.mts +1 -0
- package/dist/types-esm/runtimeLifecycle.d.mts +10 -0
- package/dist/types-esm/serverConfig.d.mts +17 -0
- package/dist/types-esm/serverPlugin.d.mts +5 -0
- package/dist/types-esm/static-serving/plugin.d.mts +3 -0
- package/dist/types-esm/static-serving/responders.d.mts +2 -0
- package/dist/types-esm/static-serving/staticModuleFederation.d.mts +13 -0
- package/dist/types-esm/static-serving/staticPrecompressed.d.mts +13 -0
- package/dist/types-esm/telemetry/envelope.d.mts +55 -0
- package/dist/types-esm/telemetry/exporters.d.mts +12 -0
- package/dist/types-esm/telemetry/healthEvaluation.d.mts +20 -0
- package/dist/types-esm/telemetry/healthMonitor.d.mts +88 -0
- package/dist/types-esm/telemetry/healthSetup.d.mts +17 -0
- package/dist/types-esm/telemetry/lifecycle.d.mts +18 -0
- package/dist/types-esm/telemetry/metrics.d.mts +3 -0
- package/dist/types-esm/telemetry/plugin.d.mts +13 -0
- package/dist/types-esm/telemetry/registry.d.mts +69 -0
- package/dist/types-esm/telemetry/registryTypes.d.mts +50 -0
- package/dist/types-esm/telemetry/runtimeEndpoints.d.mts +35 -0
- package/dist/types-esm/telemetry.d.mts +1 -0
- package/dist/types-esm/telemetryCore.d.mts +6 -0
- package/package.json +160 -28
- package/rslib.config.mts +36 -2
- package/rstest.config.mts +11 -0
- package/src/bff-policy/crossProjectPolicy.ts +754 -0
- package/src/bff-policy/index.ts +1 -0
- package/src/bff-policy/node.ts +2 -0
- package/src/bff-policy/operationContracts.ts +298 -0
- package/src/bff-policy/resolveCrossProjectPolicy.ts +88 -0
- package/src/contract-gate-snapshot-store/http-store.ts +1 -11
- package/src/errorResponsePlugin.ts +21 -0
- package/src/index.ts +4 -0
- package/src/localisedLoaderPlugin.ts +34 -0
- package/src/mfCache.ts +4 -3
- package/src/module-federation-css/plugin.ts +4 -3
- package/src/serverConfig.ts +32 -0
- package/src/serverPlugin.ts +38 -0
- package/src/static-serving/plugin.ts +16 -0
- package/src/static-serving/responders.ts +208 -0
- package/src/static-serving/staticModuleFederation.ts +255 -0
- package/src/static-serving/staticPrecompressed.ts +193 -0
- package/src/telemetry/exporters.ts +1 -1
- package/src/telemetry/healthSetup.ts +17 -20
- package/src/telemetry/lifecycle.ts +27 -39
- package/src/telemetry/plugin.ts +6 -4
- package/src/telemetry/runtimeEndpoints.ts +3 -2
- package/src/telemetryCore.ts +1 -1
- package/tests/bff-policy/crossProjectPolicy.matrix.test.ts +450 -0
- package/tests/bff-policy/crossProjectPolicy.test.ts +197 -0
- package/tests/bff-policy/operationContracts.test.ts +221 -0
- package/tests/bff-policy/optionalZodPeer.test.ts +30 -0
- package/tests/bff-policy/resolveCrossProjectPolicy.test.ts +76 -0
- package/tests/contractGateSnapshotObserver.test.ts +0 -58
- package/tests/contractGateSnapshotStore.test.ts +0 -51
- package/tests/env.test.ts +45 -64
- package/tests/localisedLoader.test.ts +120 -0
- package/tests/mfCache.test.ts +1 -88
- package/tests/moduleFederationCss.test.ts +4 -48
- package/tests/nativeErrorResponse.test.ts +118 -0
- package/tests/nativeServerAssembly.test.ts +385 -0
- package/tests/runtimeLifecycle.test.ts +69 -17
- package/tests/static-serving/ordering.test.ts +214 -0
- package/tests/static-serving/static.test.ts +411 -0
- package/tests/telemetry.test.ts +35 -198
- package/tests/telemetryHealthMonitor.test.ts +0 -4
- package/tests/telemetryHealthObservation.test.ts +302 -0
- package/tests/telemetryLifecycle.test.ts +7 -303
- package/tests/telemetryRegistryQueueMatrix.test.ts +14 -111
- package/tests/registration.test.ts +0 -112
- package/tests/telemetryAutopilot.test.ts +0 -1134
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Context, ServerEnv } from '@modern-js/server-core';
|
|
2
|
+
import type { RuntimeFallbackSignalAuthConfig, RuntimeFallbackSignalConfig, RuntimeFallbackSignalSource, RuntimeFallbackSignalTrustContext, RuntimeFallbackSignalTrustPolicy } from './model.mjs';
|
|
3
|
+
export declare function resolveRuntimeFallbackSignalEndpoint(configuredEndpoint?: string): string;
|
|
4
|
+
export declare function normalizeRuntimeFallbackSignalAuthConfig(configured: {
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
headerName?: string;
|
|
7
|
+
expectedValue?: string;
|
|
8
|
+
expectedValueEnv?: string;
|
|
9
|
+
} | undefined): RuntimeFallbackSignalAuthConfig;
|
|
10
|
+
/**
|
|
11
|
+
* Normalizes auth config for the runtime fallback signal endpoint when the
|
|
12
|
+
* endpoint itself is enabled. The endpoint records observed failing contract
|
|
13
|
+
* gates, so it always requires a token.
|
|
14
|
+
*/
|
|
15
|
+
export declare function normalizeRequiredRuntimeFallbackSignalAuthConfig(configured: Parameters<typeof normalizeRuntimeFallbackSignalAuthConfig>[0]): RuntimeFallbackSignalAuthConfig;
|
|
16
|
+
export declare function enforceRuntimeFallbackSignalAuthToken(token: string | undefined, authConfig: RuntimeFallbackSignalAuthConfig): void;
|
|
17
|
+
export declare function enforceRuntimeFallbackSignalAuth(c: Context<ServerEnv>, runtimeSignalConfig: RuntimeFallbackSignalConfig): void;
|
|
18
|
+
export declare function normalizeRuntimeFallbackTrustPolicy(configured: {
|
|
19
|
+
allowedApps?: string[];
|
|
20
|
+
allowedEntryOrigins?: string[];
|
|
21
|
+
expectedRuntimeDigests?: Record<string, string>;
|
|
22
|
+
enforceRuntimeDigest?: boolean;
|
|
23
|
+
maxSignalsPerWindow?: number;
|
|
24
|
+
windowMs?: number;
|
|
25
|
+
dedupeWindowMs?: number;
|
|
26
|
+
} | undefined): RuntimeFallbackSignalTrustPolicy;
|
|
27
|
+
export declare function enforceRuntimeFallbackSignalTrustPolicy(payload: Record<string, unknown>, runtimeSignalContext: RuntimeFallbackSignalTrustContext, source?: RuntimeFallbackSignalSource): {
|
|
28
|
+
deduped: boolean;
|
|
29
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RuntimeFallbackSignalConfig, RuntimeFallbackSignalRuntimeState, RuntimeFallbackSignalTrustPolicy } from './model.mjs';
|
|
2
|
+
export declare function createRuntimeFallbackSignalRuntimeState(): RuntimeFallbackSignalRuntimeState;
|
|
3
|
+
export declare function cleanupRuntimeFallbackSignalRuntimeState(now: number, runtimeState: RuntimeFallbackSignalRuntimeState, trustPolicy: RuntimeFallbackSignalTrustPolicy): void;
|
|
4
|
+
export declare function persistRuntimeFallbackContractGate(payload: Record<string, unknown>, runtimeSignalConfig: RuntimeFallbackSignalConfig): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './runtime-fallback-signal/index.mjs';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ServerRuntimeHandle = (request: Request, ...args: any[]) => Response | Promise<Response>;
|
|
2
|
+
export type DisposableServerRuntimeHandle = ServerRuntimeHandle & {
|
|
3
|
+
dispose: () => Promise<void>;
|
|
4
|
+
};
|
|
5
|
+
type RuntimeDisposer = () => void | Promise<void>;
|
|
6
|
+
export declare const registerServerRuntimeDisposer: (owner: object, disposer: RuntimeDisposer) => () => void;
|
|
7
|
+
export declare const disposeServerRuntime: (owner: object) => Promise<void>;
|
|
8
|
+
export declare const createDisposableServerRuntimeHandle: (owner: object, handle: ServerRuntimeHandle) => DisposableServerRuntimeHandle;
|
|
9
|
+
export declare const initializeDisposableServerRuntime: (owner: object, handle: ServerRuntimeHandle, initialize: () => Promise<void>) => Promise<DisposableServerRuntimeHandle>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { BffRuntimeUserConfig, BffRuntimeFramework as CanonicalBffRuntimeFramework, ServerTelemetryConfigExtension } from '@modern-js/runtime-extensions/server-config';
|
|
2
|
+
import type { BffUserConfig, ServerUserConfig } from '@modern-js/server-core';
|
|
3
|
+
type BffConfigExtension = Omit<BffRuntimeUserConfig, 'runtimeFramework'>;
|
|
4
|
+
type ForkBffRuntimeRegistry = Record<Exclude<CanonicalBffRuntimeFramework, 'hono'>, true>;
|
|
5
|
+
declare module '@modern-js/plugin/server' {
|
|
6
|
+
interface BffRuntimeRegistry extends ForkBffRuntimeRegistry {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
declare module '@modern-js/server-core' {
|
|
10
|
+
interface BffUserConfig extends BffConfigExtension {
|
|
11
|
+
}
|
|
12
|
+
interface ServerUserConfig extends ServerTelemetryConfigExtension {
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export type UltramodernBffUserConfig = Omit<BffUserConfig, keyof BffRuntimeUserConfig> & BffRuntimeUserConfig;
|
|
16
|
+
export type UltramodernServerUserConfig = ServerUserConfig & ServerTelemetryConfigExtension;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './serverConfig.mjs';
|
|
2
|
+
import type { ServerPlugin } from '@modern-js/server-core';
|
|
3
|
+
/** Compose fork server policies through the native ServerPlugin extension. */
|
|
4
|
+
export declare const ultramodernServerPlugin: () => ServerPlugin;
|
|
5
|
+
export default ultramodernServerPlugin;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Middleware } from '@modern-js/server-core';
|
|
2
|
+
export declare const MODULE_FEDERATION_MANIFEST_FILE = "mf-manifest.json";
|
|
3
|
+
export type ModuleFederationServeAssets = {
|
|
4
|
+
assets: Set<string>;
|
|
5
|
+
remoteEntries: Set<string>;
|
|
6
|
+
};
|
|
7
|
+
export declare const getModuleFederationRequestPath: (pathname: string, pathPrefix: string) => string;
|
|
8
|
+
export declare const isModuleFederationManifestRequest: (requestPath: string) => boolean;
|
|
9
|
+
export declare const isBackendModuleFederationManifestRequest: (requestPath: string) => requestPath is "backend-mf-manifest.json";
|
|
10
|
+
export declare const applyModuleFederationAssetHeaders: (c: Parameters<Middleware>[0]) => void;
|
|
11
|
+
export declare const patchModuleFederationManifestPublicPath: (c: Parameters<Middleware>[0], manifestBuffer: Buffer, pathPrefix: string) => Buffer<ArrayBufferLike>;
|
|
12
|
+
export declare const patchModuleFederationRemoteEntryPublicPath: (c: Parameters<Middleware>[0], remoteEntryBuffer: Buffer, pathPrefix: string) => Buffer<ArrayBufferLike>;
|
|
13
|
+
export declare const getModuleFederationAssetList: (pwd: string) => Promise<ModuleFederationServeAssets>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Middleware } from '@modern-js/server-core';
|
|
2
|
+
type SupportedEncoding = 'br' | 'gzip';
|
|
3
|
+
type ResolvePreCompressedAssetResult = {
|
|
4
|
+
selected: {
|
|
5
|
+
filepath: string;
|
|
6
|
+
encoding: SupportedEncoding;
|
|
7
|
+
} | null;
|
|
8
|
+
hasVariant: boolean;
|
|
9
|
+
acceptable: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const resolvePreCompressedAsset: (c: Parameters<Middleware>[0], filepath: string) => Promise<ResolvePreCompressedAssetResult>;
|
|
12
|
+
export declare const applyPreCompressedAssetHeaders: (c: Parameters<Middleware>[0], preCompressedAsset: ResolvePreCompressedAssetResult) => void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { MonitorEvent } from '@modern-js/types';
|
|
2
|
+
export type TelemetrySignalType = 'log' | 'metric' | 'trace';
|
|
3
|
+
export interface TelemetryEnvelope {
|
|
4
|
+
timestamp: number;
|
|
5
|
+
service: string;
|
|
6
|
+
module: string;
|
|
7
|
+
environment: string;
|
|
8
|
+
signalType: TelemetrySignalType;
|
|
9
|
+
name: string;
|
|
10
|
+
level?: string;
|
|
11
|
+
value?: number;
|
|
12
|
+
unit?: string;
|
|
13
|
+
traceId?: string;
|
|
14
|
+
spanId?: string;
|
|
15
|
+
parentSpanId?: string;
|
|
16
|
+
tags?: Record<string, string>;
|
|
17
|
+
attributes?: Record<string, unknown>;
|
|
18
|
+
error?: {
|
|
19
|
+
name?: string;
|
|
20
|
+
message: string;
|
|
21
|
+
stack?: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface TelemetryExporter {
|
|
25
|
+
name: string;
|
|
26
|
+
init?: (context: {
|
|
27
|
+
service: string;
|
|
28
|
+
module: string;
|
|
29
|
+
environment: string;
|
|
30
|
+
}) => void | Promise<void>;
|
|
31
|
+
emit: (batch: TelemetryEnvelope[]) => void | Promise<void>;
|
|
32
|
+
flush?: () => void | Promise<void>;
|
|
33
|
+
shutdown?: () => void | Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
export type TelemetryEnvelopeBuilderContext = {
|
|
36
|
+
service: string;
|
|
37
|
+
module: string;
|
|
38
|
+
environment: string;
|
|
39
|
+
maxQueueSize: number;
|
|
40
|
+
};
|
|
41
|
+
export declare function buildDroppedEnvelope(context: TelemetryEnvelopeBuilderContext, droppedCount: number): TelemetryEnvelope;
|
|
42
|
+
export declare function buildQueueDepthEnvelope(context: TelemetryEnvelopeBuilderContext, queueDepth: number): TelemetryEnvelope;
|
|
43
|
+
export declare function buildQueueUtilizationEnvelope(context: TelemetryEnvelopeBuilderContext, queueDepth: number): TelemetryEnvelope;
|
|
44
|
+
export declare function buildStartupProbeEnvelope(context: TelemetryEnvelopeBuilderContext): TelemetryEnvelope;
|
|
45
|
+
export declare function clamp(value: number, min: number, max: number): number;
|
|
46
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
47
|
+
export declare function redactObject(value: unknown, redactionKeys: Set<string>): Record<string, unknown> | undefined;
|
|
48
|
+
export declare function toTelemetryEnvelope(event: MonitorEvent, input: {
|
|
49
|
+
service: string;
|
|
50
|
+
module: string;
|
|
51
|
+
environment: string;
|
|
52
|
+
traceId?: string;
|
|
53
|
+
spanId?: string;
|
|
54
|
+
attributes?: Record<string, unknown>;
|
|
55
|
+
}): TelemetryEnvelope;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TelemetryExporter } from './envelope.mjs';
|
|
2
|
+
export interface OtlpExporterOptions {
|
|
3
|
+
endpoint?: string;
|
|
4
|
+
headers?: Record<string, string>;
|
|
5
|
+
timeoutMs?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface VictoriaMetricsExporterOptions extends OtlpExporterOptions {
|
|
8
|
+
metricPrefix?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function createOtlpTelemetryExporter(options?: OtlpExporterOptions): TelemetryExporter;
|
|
11
|
+
export declare function createVictoriaMetricsTelemetryExporter(options?: VictoriaMetricsExporterOptions): TelemetryExporter;
|
|
12
|
+
export declare function warnOnMetricsOtlpEndpoint(endpoint: string | undefined): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TelemetryContractGateStatus, TelemetryHealthFailure } from './healthMonitor.mjs';
|
|
2
|
+
import type { TelemetryQueueStats } from './registryTypes.mjs';
|
|
3
|
+
interface TelemetryHealthMetrics {
|
|
4
|
+
queueStats: TelemetryQueueStats;
|
|
5
|
+
unhealthyExporterCount: number;
|
|
6
|
+
requiredContractGates: readonly string[];
|
|
7
|
+
contractGates: ReadonlyMap<string, TelemetryContractGateStatus>;
|
|
8
|
+
}
|
|
9
|
+
interface TelemetryHealthThresholds {
|
|
10
|
+
maxQueueUtilization: number;
|
|
11
|
+
maxTotalDropped: number;
|
|
12
|
+
maxUnhealthyExporters: number;
|
|
13
|
+
}
|
|
14
|
+
export interface TelemetryHealthEvaluationResult {
|
|
15
|
+
failures: TelemetryHealthFailure[];
|
|
16
|
+
queueStats: TelemetryQueueStats;
|
|
17
|
+
unhealthyExporterCount: number;
|
|
18
|
+
}
|
|
19
|
+
export declare const evaluateTelemetryHealth: (metrics: TelemetryHealthMetrics, thresholds: TelemetryHealthThresholds) => TelemetryHealthEvaluationResult;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { TelemetryRegistry } from './registry.mjs';
|
|
2
|
+
import type { TelemetryQueueStats } from './registryTypes.mjs';
|
|
3
|
+
export type TelemetryHealthState = 'pending' | 'healthy' | 'unhealthy';
|
|
4
|
+
export type TelemetryHealthTransition = 'none' | 'became_healthy' | 'became_unhealthy';
|
|
5
|
+
export type TelemetryHealthFailureReason = 'queue_utilization' | 'queue_dropped' | 'unhealthy_exporter' | 'contract_gate_missing' | 'contract_gate_failed';
|
|
6
|
+
export interface TelemetryHealthFailure {
|
|
7
|
+
reason: TelemetryHealthFailureReason;
|
|
8
|
+
gate?: string;
|
|
9
|
+
message?: string;
|
|
10
|
+
threshold?: number;
|
|
11
|
+
value?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface TelemetryContractGateStatus {
|
|
14
|
+
name: string;
|
|
15
|
+
passed: boolean;
|
|
16
|
+
reason?: string;
|
|
17
|
+
updatedAt: number;
|
|
18
|
+
}
|
|
19
|
+
export interface TelemetryHealthEvaluation {
|
|
20
|
+
timestamp: number;
|
|
21
|
+
transition: TelemetryHealthTransition;
|
|
22
|
+
state: TelemetryHealthState;
|
|
23
|
+
consecutiveHealthy: number;
|
|
24
|
+
consecutiveFailures: number;
|
|
25
|
+
failures: TelemetryHealthFailure[];
|
|
26
|
+
queueStats: TelemetryQueueStats;
|
|
27
|
+
unhealthyExporterCount: number;
|
|
28
|
+
contractGates: TelemetryContractGateStatus[];
|
|
29
|
+
}
|
|
30
|
+
export interface TelemetryHealthStatusSnapshot {
|
|
31
|
+
timestamp: number;
|
|
32
|
+
state: TelemetryHealthState;
|
|
33
|
+
consecutiveHealthy: number;
|
|
34
|
+
consecutiveFailures: number;
|
|
35
|
+
queueStats: TelemetryQueueStats;
|
|
36
|
+
unhealthyExporterCount: number;
|
|
37
|
+
requiredContractGates: string[];
|
|
38
|
+
contractGates: TelemetryContractGateStatus[];
|
|
39
|
+
failurePreview: TelemetryHealthFailure[];
|
|
40
|
+
}
|
|
41
|
+
export interface TelemetryHealthMonitorOptions {
|
|
42
|
+
registry: TelemetryRegistry;
|
|
43
|
+
evaluationIntervalMs?: number;
|
|
44
|
+
minConsecutiveHealthyEvaluations?: number;
|
|
45
|
+
minConsecutiveFailedEvaluations?: number;
|
|
46
|
+
maxQueueUtilization?: number;
|
|
47
|
+
maxTotalDropped?: number;
|
|
48
|
+
maxUnhealthyExporters?: number;
|
|
49
|
+
requiredContractGates?: string[];
|
|
50
|
+
onEvaluate?: (evaluation: TelemetryHealthEvaluation) => void;
|
|
51
|
+
onTransition?: (evaluation: TelemetryHealthEvaluation) => void;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Observes telemetry and contract-gate health with hysteresis.
|
|
55
|
+
*
|
|
56
|
+
* This class reports health only. It does not deploy, promote, route, or roll
|
|
57
|
+
* back application revisions.
|
|
58
|
+
*/
|
|
59
|
+
export declare class TelemetryHealthMonitor {
|
|
60
|
+
private readonly registry;
|
|
61
|
+
private readonly evaluationIntervalMs;
|
|
62
|
+
private readonly minConsecutiveHealthyEvaluations;
|
|
63
|
+
private readonly minConsecutiveFailedEvaluations;
|
|
64
|
+
private readonly maxQueueUtilization;
|
|
65
|
+
private readonly maxTotalDropped;
|
|
66
|
+
private readonly maxUnhealthyExporters;
|
|
67
|
+
private requiredContractGates;
|
|
68
|
+
private readonly onEvaluate?;
|
|
69
|
+
private readonly onTransition?;
|
|
70
|
+
private readonly contractGates;
|
|
71
|
+
private state;
|
|
72
|
+
private consecutiveHealthy;
|
|
73
|
+
private consecutiveFailures;
|
|
74
|
+
private evaluationTimer?;
|
|
75
|
+
constructor(options: TelemetryHealthMonitorOptions);
|
|
76
|
+
setRequiredContractGates(gates: string[]): void;
|
|
77
|
+
addRequiredContractGate(name: string): void;
|
|
78
|
+
setContractGate(name: string, passed: boolean, reason?: string): void;
|
|
79
|
+
setContractGates(gates: Record<string, boolean | {
|
|
80
|
+
passed: boolean;
|
|
81
|
+
reason?: string;
|
|
82
|
+
}>): void;
|
|
83
|
+
private collectFailures;
|
|
84
|
+
evaluate(): TelemetryHealthEvaluation;
|
|
85
|
+
getStatusSnapshot(): TelemetryHealthStatusSnapshot;
|
|
86
|
+
start(): void;
|
|
87
|
+
stop(): void;
|
|
88
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ServerTelemetryUserConfig } from '@modern-js/runtime-extensions/server-config';
|
|
2
|
+
import { type ContractGateSnapshotStore } from '../contract-gate-snapshot-store/index.mjs';
|
|
3
|
+
import { type RuntimeFallbackSignalAuthConfig, type RuntimeFallbackSignalConfig } from '../runtimeFallbackSignal.mjs';
|
|
4
|
+
import { TelemetryHealthMonitor, TelemetryRegistry } from '../telemetryCore.mjs';
|
|
5
|
+
type SetupTelemetryHealthMonitoringOptions = {
|
|
6
|
+
registry: TelemetryRegistry;
|
|
7
|
+
appDirectory: string;
|
|
8
|
+
healthConfig: ServerTelemetryUserConfig['health'] | undefined;
|
|
9
|
+
};
|
|
10
|
+
type SetupTelemetryHealthMonitoringResult = {
|
|
11
|
+
healthMonitor?: TelemetryHealthMonitor;
|
|
12
|
+
gateSnapshotStorePromise?: Promise<ContractGateSnapshotStore>;
|
|
13
|
+
runtimeFallbackSignalConfig?: RuntimeFallbackSignalConfig;
|
|
14
|
+
runtimeStatusAuthConfig?: RuntimeFallbackSignalAuthConfig;
|
|
15
|
+
};
|
|
16
|
+
export declare const setupTelemetryHealthMonitoring: ({ registry, appDirectory, healthConfig, }: SetupTelemetryHealthMonitoringOptions) => SetupTelemetryHealthMonitoringResult;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ServerTelemetryUserConfig } from '@modern-js/runtime-extensions/server-config';
|
|
2
|
+
import { type ContractGateSnapshotStore } from '../contract-gate-snapshot-store/index.mjs';
|
|
3
|
+
import { TelemetryHealthMonitor, TelemetryRegistry } from '../telemetryCore.mjs';
|
|
4
|
+
type TelemetryLifecycleApi = {
|
|
5
|
+
onDispose: (disposer: () => Promise<void>) => () => void;
|
|
6
|
+
onPrepare: (prepare: () => Promise<void>) => void;
|
|
7
|
+
};
|
|
8
|
+
type RegisterTelemetryLifecycleOptions = {
|
|
9
|
+
api: TelemetryLifecycleApi;
|
|
10
|
+
registry: TelemetryRegistry;
|
|
11
|
+
telemetryConfig: ServerTelemetryUserConfig;
|
|
12
|
+
healthConfig: ServerTelemetryUserConfig['health'] | undefined;
|
|
13
|
+
healthMonitor?: TelemetryHealthMonitor;
|
|
14
|
+
gateSnapshotStorePromise?: Promise<ContractGateSnapshotStore>;
|
|
15
|
+
appDirectory: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const registerTelemetryLifecycle: ({ api, registry, telemetryConfig, healthConfig, healthMonitor, gateSnapshotStorePromise, appDirectory, }: RegisterTelemetryLifecycleOptions) => void;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ServerTelemetryUserConfig } from '@modern-js/runtime-extensions/server-config';
|
|
2
|
+
import type { ServerPlugin } from '@modern-js/server-core';
|
|
3
|
+
import { type TelemetryRegistryOptions } from '../telemetryCore.mjs';
|
|
4
|
+
export { createRuntimeFallbackSignalRuntimeState, createRuntimeSignalError, DEFAULT_RUNTIME_FALLBACK_SIGNAL_ENDPOINT, DEFAULT_RUNTIME_STATUS_ENDPOINT, enforceRuntimeFallbackSignalAuthToken, enforceRuntimeFallbackSignalTrustPolicy, getRuntimeSignalErrorStatusCode, normalizeRequiredRuntimeFallbackSignalAuthConfig, normalizeRuntimeFallbackSignalAuthConfig, normalizeRuntimeFallbackTrustPolicy, parseRuntimeFallbackSignalPayloadFromRawBody, type RuntimeFallbackSignalAuthConfig, type RuntimeFallbackSignalRuntimeState, type RuntimeFallbackSignalSource, type RuntimeFallbackSignalTrustContext, type RuntimeFallbackSignalTrustPolicy, type RuntimeSignalError, type RuntimeSignalErrorCode, resolveRuntimeFallbackSignalEndpoint, } from '../runtimeFallbackSignal.mjs';
|
|
5
|
+
export { createOtlpTelemetryExporter, createTelemetryAwareMetrics, createVictoriaMetricsTelemetryExporter, type OtlpExporterOptions, type TelemetryContractGateStatus, type TelemetryEnvelope, type TelemetryExporter, type TelemetryExporterHealthStatus, type TelemetryHealthEvaluation, type TelemetryHealthFailure, type TelemetryHealthFailureReason, TelemetryHealthMonitor, type TelemetryHealthMonitorOptions, type TelemetryHealthState, type TelemetryHealthStatusSnapshot, type TelemetryHealthTransition, type TelemetryQueueStats, TelemetryRegistry, type TelemetryRegistryOptions, type TelemetrySignalType, type TelemetrySloAlert, type TelemetrySloAlertType, TelemetryStartupHealthError, type VictoriaMetricsExporterOptions, } from '../telemetryCore.mjs';
|
|
6
|
+
export declare const hasEnabledTelemetryExporters: (config: ServerTelemetryUserConfig | undefined) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Builds the registry SLO options from `server.telemetry.slo`, attaching a
|
|
9
|
+
* logger sink so threshold breaches surface as server warnings (parity with
|
|
10
|
+
* the pre-extraction prod-server harness).
|
|
11
|
+
*/
|
|
12
|
+
export declare const resolveTelemetrySloOptions: (sloConfig: ServerTelemetryUserConfig['slo'], warnSink?: (message: string) => void) => NonNullable<TelemetryRegistryOptions['slo']>;
|
|
13
|
+
export declare const injectTelemetryPlugin: () => ServerPlugin;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type TelemetryEnvelope, type TelemetryExporter } from './envelope.mjs';
|
|
2
|
+
import { type TelemetryExporterHealthStatus, type TelemetryQueueStats, type TelemetryRegistryOptions } from './registryTypes.mjs';
|
|
3
|
+
export declare class TelemetryRegistry {
|
|
4
|
+
private readonly exporters;
|
|
5
|
+
private readonly queue;
|
|
6
|
+
private readonly redactionKeys;
|
|
7
|
+
private readonly service;
|
|
8
|
+
private readonly module;
|
|
9
|
+
private readonly environment;
|
|
10
|
+
private readonly samplingRate;
|
|
11
|
+
private readonly maxBatchSize;
|
|
12
|
+
private readonly maxQueueSize;
|
|
13
|
+
private readonly flushIntervalMs;
|
|
14
|
+
private readonly flushTimer?;
|
|
15
|
+
private droppedCount;
|
|
16
|
+
private totalDroppedCount;
|
|
17
|
+
private flushing;
|
|
18
|
+
private readonly exporterHealth;
|
|
19
|
+
private readonly queueUtilizationWarnThreshold;
|
|
20
|
+
private readonly queueDroppedWarnThreshold;
|
|
21
|
+
private readonly alertCooldownMs;
|
|
22
|
+
private readonly onSloAlert?;
|
|
23
|
+
private readonly lastSloAlertAt;
|
|
24
|
+
constructor(options: TelemetryRegistryOptions);
|
|
25
|
+
register(exporter: TelemetryExporter): Promise<void>;
|
|
26
|
+
private getOrCreateExporterHealth;
|
|
27
|
+
private markExporterHealthy;
|
|
28
|
+
private markExporterFailure;
|
|
29
|
+
private maybeEmitSloAlert;
|
|
30
|
+
enqueue(envelope: TelemetryEnvelope): void;
|
|
31
|
+
enqueueMetric(input: {
|
|
32
|
+
name: string;
|
|
33
|
+
value: number;
|
|
34
|
+
unit?: string;
|
|
35
|
+
traceId?: string;
|
|
36
|
+
spanId?: string;
|
|
37
|
+
parentSpanId?: string;
|
|
38
|
+
tags?: Record<string, string>;
|
|
39
|
+
attributes?: Record<string, unknown>;
|
|
40
|
+
}): void;
|
|
41
|
+
enqueueLog(input: {
|
|
42
|
+
name: string;
|
|
43
|
+
level: string;
|
|
44
|
+
traceId?: string;
|
|
45
|
+
spanId?: string;
|
|
46
|
+
parentSpanId?: string;
|
|
47
|
+
tags?: Record<string, string>;
|
|
48
|
+
attributes?: Record<string, unknown>;
|
|
49
|
+
error?: TelemetryEnvelope['error'];
|
|
50
|
+
}): void;
|
|
51
|
+
enqueueTrace(input: {
|
|
52
|
+
name: string;
|
|
53
|
+
traceId?: string;
|
|
54
|
+
spanId?: string;
|
|
55
|
+
parentSpanId?: string;
|
|
56
|
+
tags?: Record<string, string>;
|
|
57
|
+
attributes?: Record<string, unknown>;
|
|
58
|
+
}): void;
|
|
59
|
+
private baseEnvelope;
|
|
60
|
+
private emitBatch;
|
|
61
|
+
startupHealthCheck(options?: {
|
|
62
|
+
failLoud?: boolean;
|
|
63
|
+
}): Promise<void>;
|
|
64
|
+
getExporterHealth(): TelemetryExporterHealthStatus[];
|
|
65
|
+
getQueueStats(): TelemetryQueueStats;
|
|
66
|
+
private flushInternal;
|
|
67
|
+
flush(): Promise<void>;
|
|
68
|
+
shutdown(): Promise<void>;
|
|
69
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface TelemetryRegistryOptions {
|
|
2
|
+
service: string;
|
|
3
|
+
module: string;
|
|
4
|
+
environment: string;
|
|
5
|
+
samplingRate?: number;
|
|
6
|
+
flushIntervalMs?: number;
|
|
7
|
+
maxBatchSize?: number;
|
|
8
|
+
maxQueueSize?: number;
|
|
9
|
+
redactionKeys?: string[];
|
|
10
|
+
slo?: {
|
|
11
|
+
queueUtilizationWarnThreshold?: number;
|
|
12
|
+
queueDroppedWarnThreshold?: number;
|
|
13
|
+
alertCooldownMs?: number;
|
|
14
|
+
onAlert?: (alert: TelemetrySloAlert) => void;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export type TelemetrySloAlertType = 'queue.utilization' | 'queue.drop';
|
|
18
|
+
export interface TelemetrySloAlert {
|
|
19
|
+
timestamp: number;
|
|
20
|
+
service: string;
|
|
21
|
+
module: string;
|
|
22
|
+
environment: string;
|
|
23
|
+
type: TelemetrySloAlertType;
|
|
24
|
+
value: number;
|
|
25
|
+
threshold: number;
|
|
26
|
+
queueDepth: number;
|
|
27
|
+
queueCapacity: number;
|
|
28
|
+
queueUtilization: number;
|
|
29
|
+
totalDropped: number;
|
|
30
|
+
}
|
|
31
|
+
export interface TelemetryQueueStats {
|
|
32
|
+
depth: number;
|
|
33
|
+
capacity: number;
|
|
34
|
+
utilization: number;
|
|
35
|
+
pendingDropped: number;
|
|
36
|
+
totalDropped: number;
|
|
37
|
+
}
|
|
38
|
+
export interface TelemetryExporterHealthStatus {
|
|
39
|
+
name: string;
|
|
40
|
+
healthy: boolean;
|
|
41
|
+
failures: number;
|
|
42
|
+
lastError?: string;
|
|
43
|
+
lastSuccessAt?: number;
|
|
44
|
+
lastFailureAt?: number;
|
|
45
|
+
}
|
|
46
|
+
export declare class TelemetryStartupHealthError extends Error {
|
|
47
|
+
readonly code = "TELEMETRY_EXPORTER_STARTUP_HEALTH_FAILED";
|
|
48
|
+
readonly failedExporters: TelemetryExporterHealthStatus[];
|
|
49
|
+
constructor(failedExporters: TelemetryExporterHealthStatus[]);
|
|
50
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Context, ServerEnv } from '@modern-js/server-core';
|
|
2
|
+
import { type RuntimeFallbackSignalAuthConfig, type RuntimeFallbackSignalConfig } from '../runtimeFallbackSignal.mjs';
|
|
3
|
+
import type { TelemetryHealthMonitor, TelemetryRegistry } from '../telemetryCore.mjs';
|
|
4
|
+
type RuntimeStatusMiddlewareOptions = {
|
|
5
|
+
registry: TelemetryRegistry;
|
|
6
|
+
healthMonitor?: TelemetryHealthMonitor;
|
|
7
|
+
runtimeFallbackSignalConfig?: RuntimeFallbackSignalConfig;
|
|
8
|
+
runtimeStatusAuthConfig?: RuntimeFallbackSignalAuthConfig;
|
|
9
|
+
};
|
|
10
|
+
export declare const createRuntimeFallbackSignalMiddleware: (signalConfig: RuntimeFallbackSignalConfig) => {
|
|
11
|
+
name: string;
|
|
12
|
+
path: string;
|
|
13
|
+
method: 'post';
|
|
14
|
+
order: 'pre';
|
|
15
|
+
handler: (c: Context<ServerEnv>) => Promise<(Response & import("hono").TypedResponse<{
|
|
16
|
+
ok: true;
|
|
17
|
+
}, 202, "json">) | (Response & import("hono").TypedResponse<{
|
|
18
|
+
ok: false;
|
|
19
|
+
error: string;
|
|
20
|
+
}, 400 | 401 | 403 | 413 | 429 | 500, "json">)>;
|
|
21
|
+
};
|
|
22
|
+
export declare const createRuntimeStatusMiddleware: ({ registry, healthMonitor, runtimeFallbackSignalConfig, runtimeStatusAuthConfig, }: RuntimeStatusMiddlewareOptions) => {
|
|
23
|
+
name: string;
|
|
24
|
+
path: string;
|
|
25
|
+
method: 'get';
|
|
26
|
+
order: 'pre';
|
|
27
|
+
handler: (c: Context<ServerEnv>) => Promise<(Response & import("hono").TypedResponse<{
|
|
28
|
+
ok: true;
|
|
29
|
+
timestamp: number;
|
|
30
|
+
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
31
|
+
ok: false;
|
|
32
|
+
error: string;
|
|
33
|
+
}, 400 | 401 | 403 | 413 | 429 | 500, "json">)>;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './telemetry/plugin.mjs';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { type TelemetryEnvelope, type TelemetryExporter, type TelemetrySignalType, toTelemetryEnvelope, } from './telemetry/envelope.mjs';
|
|
2
|
+
export { createOtlpTelemetryExporter, createVictoriaMetricsTelemetryExporter, type OtlpExporterOptions, type VictoriaMetricsExporterOptions, warnOnMetricsOtlpEndpoint, } from './telemetry/exporters.mjs';
|
|
3
|
+
export { type TelemetryContractGateStatus, type TelemetryHealthEvaluation, type TelemetryHealthFailure, type TelemetryHealthFailureReason, TelemetryHealthMonitor, type TelemetryHealthMonitorOptions, type TelemetryHealthState, type TelemetryHealthStatusSnapshot, type TelemetryHealthTransition, } from './telemetry/healthMonitor.mjs';
|
|
4
|
+
export { createTelemetryAwareMetrics } from './telemetry/metrics.mjs';
|
|
5
|
+
export { TelemetryRegistry } from './telemetry/registry.mjs';
|
|
6
|
+
export { type TelemetryExporterHealthStatus, type TelemetryQueueStats, type TelemetryRegistryOptions, type TelemetrySloAlert, type TelemetrySloAlertType, TelemetryStartupHealthError, } from './telemetry/registryTypes.mjs';
|