@synnaxlabs/alamos 0.1.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/.eslintrc.cjs +18 -0
- package/LICENSE +4 -0
- package/dist/dev/index.d.ts +2 -0
- package/dist/dev.cjs +15232 -0
- package/dist/dev.cjs.map +1 -0
- package/dist/dev.js +15232 -0
- package/dist/dev.js.map +1 -0
- package/dist/environment.d.ts +18 -0
- package/dist/external.d.ts +3 -0
- package/dist/index.cjs +26 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/instrumentation-0b5118e7.cjs +945 -0
- package/dist/instrumentation-0b5118e7.cjs.map +1 -0
- package/dist/instrumentation-2edee102.js +946 -0
- package/dist/instrumentation-2edee102.js.map +1 -0
- package/dist/instrumentation-LKYcTUHj.js +946 -0
- package/dist/instrumentation-LKYcTUHj.js.map +1 -0
- package/dist/instrumentation-suDg2eHN.cjs +945 -0
- package/dist/instrumentation-suDg2eHN.cjs.map +1 -0
- package/dist/instrumentation.d.ts +20 -0
- package/dist/log.d.ts +35 -0
- package/dist/meta.d.ts +11 -0
- package/dist/trace.d.ts +103 -0
- package/dist/trace.spec.d.ts +1 -0
- package/package.json +61 -0
- package/src/dev/index.ts +43 -0
- package/src/environment.ts +33 -0
- package/src/external.ts +12 -0
- package/src/index.ts +11 -0
- package/src/instrumentation.ts +51 -0
- package/src/log.ts +104 -0
- package/src/meta.ts +41 -0
- package/src/trace.spec.ts +38 -0
- package/src/trace.ts +188 -0
- package/tsconfig.json +11 -0
- package/tsconfig.vite.json +4 -0
- package/vite.config.ts +26 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** A list of valid environments */
|
|
2
|
+
export declare const ENVIRONMENTS: readonly ["bench", "debug", "prod"];
|
|
3
|
+
/**
|
|
4
|
+
* Defines the environment in whcih instrumentation in running. Traces can
|
|
5
|
+
* be constrained to run only in certain environments.
|
|
6
|
+
*/
|
|
7
|
+
export type Environment = (typeof ENVIRONMENTS)[number];
|
|
8
|
+
/**
|
|
9
|
+
* Takes an environment and returns true if it is valid for use i.e.
|
|
10
|
+
* 'should this trace be executed?
|
|
11
|
+
*/
|
|
12
|
+
export type EnvironmentFilter = (env: Environment) => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @param treshold
|
|
15
|
+
* @returns An environnment filter that returns true if the environment is greater
|
|
16
|
+
* than or equal to the given threshold.
|
|
17
|
+
*/
|
|
18
|
+
export declare const envThresholdFilter: (treshold: Environment) => EnvironmentFilter;
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const instrumentation = require("./instrumentation-suDg2eHN.cjs");
|
|
4
|
+
const external = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5
|
+
__proto__: null,
|
|
6
|
+
Instrumentation: instrumentation.Instrumentation,
|
|
7
|
+
LOG_LEVELS: instrumentation.LOG_LEVELS,
|
|
8
|
+
Logger: instrumentation.Logger,
|
|
9
|
+
NOOP: instrumentation.NOOP,
|
|
10
|
+
NoopSpan: instrumentation.NoopSpan,
|
|
11
|
+
Tracer: instrumentation.Tracer,
|
|
12
|
+
_Span: instrumentation._Span,
|
|
13
|
+
logLevelKeyFiler: instrumentation.logLevelKeyFiler,
|
|
14
|
+
logThresholdFilter: instrumentation.logThresholdFilter
|
|
15
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
16
|
+
exports.Instrumentation = instrumentation.Instrumentation;
|
|
17
|
+
exports.LOG_LEVELS = instrumentation.LOG_LEVELS;
|
|
18
|
+
exports.Logger = instrumentation.Logger;
|
|
19
|
+
exports.NOOP = instrumentation.NOOP;
|
|
20
|
+
exports.NoopSpan = instrumentation.NoopSpan;
|
|
21
|
+
exports.Tracer = instrumentation.Tracer;
|
|
22
|
+
exports._Span = instrumentation._Span;
|
|
23
|
+
exports.logLevelKeyFiler = instrumentation.logLevelKeyFiler;
|
|
24
|
+
exports.logThresholdFilter = instrumentation.logThresholdFilter;
|
|
25
|
+
exports.alamos = external;
|
|
26
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { I as Instrumentation, L as LOG_LEVELS, a as Logger, N as NOOP, b as NoopSpan, T as Tracer, _ as _Span, l as logLevelKeyFiler, c as logThresholdFilter } from "./instrumentation-LKYcTUHj.js";
|
|
2
|
+
const external = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
|
+
__proto__: null,
|
|
4
|
+
Instrumentation,
|
|
5
|
+
LOG_LEVELS,
|
|
6
|
+
Logger,
|
|
7
|
+
NOOP,
|
|
8
|
+
NoopSpan,
|
|
9
|
+
Tracer,
|
|
10
|
+
_Span,
|
|
11
|
+
logLevelKeyFiler,
|
|
12
|
+
logThresholdFilter
|
|
13
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
14
|
+
export {
|
|
15
|
+
Instrumentation,
|
|
16
|
+
LOG_LEVELS,
|
|
17
|
+
Logger,
|
|
18
|
+
NOOP,
|
|
19
|
+
NoopSpan,
|
|
20
|
+
Tracer,
|
|
21
|
+
_Span,
|
|
22
|
+
external as alamos,
|
|
23
|
+
logLevelKeyFiler,
|
|
24
|
+
logThresholdFilter
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|