@powerlines/plugin-open-telemetry 0.1.185 → 0.1.186
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/dist/index.cjs +6 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +3 -1
- package/dist/schemas/env.cjs +91 -0
- package/dist/schemas/env.d.cts +179 -0
- package/dist/schemas/env.d.cts.map +1 -0
- package/dist/schemas/env.d.mts +179 -0
- package/dist/{types → schemas}/env.d.mts.map +1 -1
- package/dist/schemas/env.mjs +87 -0
- package/dist/schemas/index.cjs +6 -0
- package/dist/schemas/index.d.cts +2 -0
- package/dist/schemas/index.d.mts +2 -0
- package/dist/schemas/index.mjs +3 -0
- package/dist/types/index.d.cts +1 -2
- package/dist/types/index.d.mts +1 -2
- package/package.json +37 -21
- package/dist/types/env.cjs +0 -14
- package/dist/types/env.d.cts +0 -76
- package/dist/types/env.d.cts.map +0 -1
- package/dist/types/env.d.mts +0 -76
- package/dist/types/env.mjs +0 -15
- /package/dist/{types → schemas}/env.mjs.map +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
2
|
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_schemas_env = require('./schemas/env.cjs');
|
|
4
|
+
require('./schemas/index.cjs');
|
|
3
5
|
const require_helpers_automd_generator = require('./helpers/automd-generator.cjs');
|
|
4
6
|
const require_components_trace_builtin = require('./components/trace-builtin.cjs');
|
|
5
7
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
@@ -36,5 +38,8 @@ const plugin = (options = {}) => {
|
|
|
36
38
|
};
|
|
37
39
|
|
|
38
40
|
//#endregion
|
|
41
|
+
exports.OtelLogLevelSchema = require_schemas_env.OtelLogLevelSchema;
|
|
42
|
+
exports.OtelTracesSamplerSchema = require_schemas_env.OtelTracesSamplerSchema;
|
|
39
43
|
exports.default = plugin;
|
|
40
|
-
exports.plugin = plugin;
|
|
44
|
+
exports.plugin = plugin;
|
|
45
|
+
exports.openTelemetryEnvSchema = require_schemas_env.openTelemetryEnvSchema;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AttributesFromHeaderFunc, AttributesFromHeaders, Configuration, FetchInstrumentationConfig, InstrumentationConfiguration, InstrumentationOptionOrName, OTLPExporterConfig, OpenTelemetryPluginContext, OpenTelemetryPluginOptions, OpenTelemetryPluginResolvedConfig, OpenTelemetryPluginUserConfig, PropagatorOrName, SampleOrName, SpanExporterOrName, SpanProcessorOrName } from "./types/plugin.cjs";
|
|
2
|
-
import { OpenTelemetryEnv } from "./
|
|
2
|
+
import { OpenTelemetryEnv, OtelLogLevel, OtelLogLevelSchema, OtelTracesSampler, OtelTracesSamplerSchema, openTelemetryEnvSchema } from "./schemas/env.cjs";
|
|
3
|
+
import "./schemas/index.cjs";
|
|
3
4
|
import "./types/index.cjs";
|
|
4
5
|
import { Plugin } from "powerlines";
|
|
5
6
|
//#region src/index.d.ts
|
|
@@ -13,5 +14,5 @@ declare module "powerlines" {
|
|
|
13
14
|
*/
|
|
14
15
|
declare const plugin: <TContext extends OpenTelemetryPluginContext = OpenTelemetryPluginContext>(options?: OpenTelemetryPluginOptions) => Plugin<TContext>[];
|
|
15
16
|
//#endregion
|
|
16
|
-
export { type AttributesFromHeaderFunc, type AttributesFromHeaders, type Configuration, type FetchInstrumentationConfig, type InstrumentationConfiguration, type InstrumentationOptionOrName, type OTLPExporterConfig,
|
|
17
|
+
export { type AttributesFromHeaderFunc, type AttributesFromHeaders, type Configuration, type FetchInstrumentationConfig, type InstrumentationConfiguration, type InstrumentationOptionOrName, type OTLPExporterConfig, OpenTelemetryEnv, type OpenTelemetryPluginContext, type OpenTelemetryPluginOptions, type OpenTelemetryPluginResolvedConfig, type OpenTelemetryPluginUserConfig, OtelLogLevel, OtelLogLevelSchema, OtelTracesSampler, OtelTracesSamplerSchema, type PropagatorOrName, type SampleOrName, type SpanExporterOrName, type SpanProcessorOrName, plugin as default, plugin, openTelemetryEnvSchema };
|
|
17
18
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;YAkCY;IACR,gBAAgB;;;;;;cAOP,SACX,iBAAiB,6BAA6B,4BAE9C,UAAS,+BA2BJ,OAAO"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AttributesFromHeaderFunc, AttributesFromHeaders, Configuration, FetchInstrumentationConfig, InstrumentationConfiguration, InstrumentationOptionOrName, OTLPExporterConfig, OpenTelemetryPluginContext, OpenTelemetryPluginOptions, OpenTelemetryPluginResolvedConfig, OpenTelemetryPluginUserConfig, PropagatorOrName, SampleOrName, SpanExporterOrName, SpanProcessorOrName } from "./types/plugin.mjs";
|
|
2
|
-
import { OpenTelemetryEnv } from "./
|
|
2
|
+
import { OpenTelemetryEnv, OtelLogLevel, OtelLogLevelSchema, OtelTracesSampler, OtelTracesSamplerSchema, openTelemetryEnvSchema } from "./schemas/env.mjs";
|
|
3
|
+
import "./schemas/index.mjs";
|
|
3
4
|
import "./types/index.mjs";
|
|
4
5
|
import { Plugin } from "powerlines";
|
|
5
6
|
//#region src/index.d.ts
|
|
@@ -13,5 +14,5 @@ declare module "powerlines" {
|
|
|
13
14
|
*/
|
|
14
15
|
declare const plugin: <TContext extends OpenTelemetryPluginContext = OpenTelemetryPluginContext>(options?: OpenTelemetryPluginOptions) => Plugin<TContext>[];
|
|
15
16
|
//#endregion
|
|
16
|
-
export { type AttributesFromHeaderFunc, type AttributesFromHeaders, type Configuration, type FetchInstrumentationConfig, type InstrumentationConfiguration, type InstrumentationOptionOrName, type OTLPExporterConfig,
|
|
17
|
+
export { type AttributesFromHeaderFunc, type AttributesFromHeaders, type Configuration, type FetchInstrumentationConfig, type InstrumentationConfiguration, type InstrumentationOptionOrName, type OTLPExporterConfig, OpenTelemetryEnv, type OpenTelemetryPluginContext, type OpenTelemetryPluginOptions, type OpenTelemetryPluginResolvedConfig, type OpenTelemetryPluginUserConfig, OtelLogLevel, OtelLogLevelSchema, OtelTracesSampler, OtelTracesSamplerSchema, type PropagatorOrName, type SampleOrName, type SpanExporterOrName, type SpanProcessorOrName, plugin as default, plugin, openTelemetryEnvSchema };
|
|
17
18
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { OtelLogLevelSchema, OtelTracesSamplerSchema, openTelemetryEnvSchema } from "./schemas/env.mjs";
|
|
2
|
+
import "./schemas/index.mjs";
|
|
1
3
|
import { trace } from "./helpers/automd-generator.mjs";
|
|
2
4
|
import { TraceBuiltin } from "./components/trace-builtin.mjs";
|
|
3
5
|
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
@@ -31,5 +33,5 @@ const plugin = (options = {}) => {
|
|
|
31
33
|
};
|
|
32
34
|
|
|
33
35
|
//#endregion
|
|
34
|
-
export { plugin as default, plugin };
|
|
36
|
+
export { OtelLogLevelSchema, OtelTracesSamplerSchema, plugin as default, plugin, openTelemetryEnvSchema };
|
|
35
37
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _powerlines_plugin_env_schemas_env = require("@powerlines/plugin-env/schemas/env");
|
|
4
|
+
let zod = require("zod");
|
|
5
|
+
zod = require_runtime.__toESM(zod, 1);
|
|
6
|
+
|
|
7
|
+
//#region src/schemas/env.ts
|
|
8
|
+
/**
|
|
9
|
+
* Supported OpenTelemetry trace samplers.
|
|
10
|
+
*/
|
|
11
|
+
const OtelTracesSamplerSchema = zod.enum([
|
|
12
|
+
"always_on",
|
|
13
|
+
"always_off",
|
|
14
|
+
"traceidratio",
|
|
15
|
+
"parentbased_traceidratio"
|
|
16
|
+
]);
|
|
17
|
+
/**
|
|
18
|
+
* OpenTelemetry SDK diagnostic log levels.
|
|
19
|
+
*/
|
|
20
|
+
const OtelLogLevelSchema = zod.enum([
|
|
21
|
+
"ALL",
|
|
22
|
+
"VERBOSE",
|
|
23
|
+
"DEBUG",
|
|
24
|
+
"INFO",
|
|
25
|
+
"WARN",
|
|
26
|
+
"ERROR",
|
|
27
|
+
"NONE"
|
|
28
|
+
]);
|
|
29
|
+
/**
|
|
30
|
+
* Zod schema for OpenTelemetry plugin environment variables.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Extends the base Powerlines {@link envSchema} with OTEL-specific configuration.
|
|
34
|
+
*/
|
|
35
|
+
const openTelemetryEnvSchema = _powerlines_plugin_env_schemas_env.envSchema.extend({
|
|
36
|
+
OTEL_SERVICE_NAME: zod.string().optional().meta({
|
|
37
|
+
description: "The name of the service. If none if provided, the plugin will attempt to use the value of the APP_NAME configuration option.",
|
|
38
|
+
readonly: true
|
|
39
|
+
}),
|
|
40
|
+
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: zod.string().default("http://localhost:4318/v1/traces").meta({
|
|
41
|
+
description: "The OTLP traces endpoint URL.",
|
|
42
|
+
defaultValue: "http://localhost:4318/v1/traces",
|
|
43
|
+
readonly: true
|
|
44
|
+
}),
|
|
45
|
+
OTEL_TRACES_SAMPLER: OtelTracesSamplerSchema.default("always_on").meta({
|
|
46
|
+
description: "The supported trace sampler to use.",
|
|
47
|
+
defaultValue: "always_on",
|
|
48
|
+
readonly: true
|
|
49
|
+
}),
|
|
50
|
+
OTEL_TRACES_SAMPLER_ARG: zod.number().default(1).meta({
|
|
51
|
+
description: "The argument for the trace sampler. For example, if using the \"traceidratio\" sampler, this would be a number between 0 and 1 representing the sampling ratio.",
|
|
52
|
+
defaultValue: 1,
|
|
53
|
+
readonly: true
|
|
54
|
+
}),
|
|
55
|
+
OTEL_EXPORTER_TYPES: zod.string().default("http").meta({
|
|
56
|
+
description: "A comma-separated list of trace exporter types to use. Supported values include \"http\" and \"console\".",
|
|
57
|
+
defaultValue: "http",
|
|
58
|
+
readonly: true
|
|
59
|
+
}),
|
|
60
|
+
OTEL_PROPAGATORS: zod.string().default("tracecontext,baggage").meta({
|
|
61
|
+
description: "A comma-separated list of trace propagator types to use. Supported values include \"tracecontext\" and \"baggage\".",
|
|
62
|
+
defaultValue: "tracecontext,baggage",
|
|
63
|
+
readonly: true
|
|
64
|
+
}),
|
|
65
|
+
OTEL_INSTRUMENTATIONS: zod.string().default("http,express").meta({
|
|
66
|
+
description: "A comma-separated list of trace instrumentations to use. Supported values include \"http\", \"express\", and \"graphql\".",
|
|
67
|
+
defaultValue: "http,express",
|
|
68
|
+
readonly: true
|
|
69
|
+
}),
|
|
70
|
+
OTEL_LOG_LEVEL: OtelLogLevelSchema.default("INFO").meta({
|
|
71
|
+
description: "The log level for OpenTelemetry SDK diagnostics. If not set, the LOG_LEVEL variable will be used to determine the log level for diagnostics.",
|
|
72
|
+
defaultValue: "INFO",
|
|
73
|
+
readonly: true
|
|
74
|
+
}),
|
|
75
|
+
OTEL_SDK_DISABLED: zod.boolean().default(false).meta({
|
|
76
|
+
description: "A boolean flag to disable the OpenTelemetry SDK. When set to \"true\", the plugin will not inject any OpenTelemetry code or configuration into the application.",
|
|
77
|
+
defaultValue: false,
|
|
78
|
+
readonly: true
|
|
79
|
+
}),
|
|
80
|
+
RUNTIME: _powerlines_plugin_env_schemas_env.RuntimeSchema.default("nodejs").meta({
|
|
81
|
+
description: "The runtime that the application is running in.",
|
|
82
|
+
defaultValue: "nodejs"
|
|
83
|
+
})
|
|
84
|
+
}).meta({ description: "The base environment configuration used by Powerlines applications with OpenTelemetry. This schema defines the environment variables, configuration options, and runtime settings used by applications." });
|
|
85
|
+
/**
|
|
86
|
+
* Inferred OpenTelemetry environment configuration type from {@link openTelemetryEnvSchema}.
|
|
87
|
+
*/
|
|
88
|
+
//#endregion
|
|
89
|
+
exports.OtelLogLevelSchema = OtelLogLevelSchema;
|
|
90
|
+
exports.OtelTracesSamplerSchema = OtelTracesSamplerSchema;
|
|
91
|
+
exports.openTelemetryEnvSchema = openTelemetryEnvSchema;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
//#region src/schemas/env.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Supported OpenTelemetry trace samplers.
|
|
5
|
+
*/
|
|
6
|
+
declare const OtelTracesSamplerSchema: z.ZodEnum<{
|
|
7
|
+
always_on: "always_on";
|
|
8
|
+
always_off: "always_off";
|
|
9
|
+
traceidratio: "traceidratio";
|
|
10
|
+
parentbased_traceidratio: "parentbased_traceidratio";
|
|
11
|
+
}>;
|
|
12
|
+
type OtelTracesSampler = z.infer<typeof OtelTracesSamplerSchema>;
|
|
13
|
+
/**
|
|
14
|
+
* OpenTelemetry SDK diagnostic log levels.
|
|
15
|
+
*/
|
|
16
|
+
declare const OtelLogLevelSchema: z.ZodEnum<{
|
|
17
|
+
ALL: "ALL";
|
|
18
|
+
VERBOSE: "VERBOSE";
|
|
19
|
+
DEBUG: "DEBUG";
|
|
20
|
+
INFO: "INFO";
|
|
21
|
+
WARN: "WARN";
|
|
22
|
+
ERROR: "ERROR";
|
|
23
|
+
NONE: "NONE";
|
|
24
|
+
}>;
|
|
25
|
+
type OtelLogLevel = z.infer<typeof OtelLogLevelSchema>;
|
|
26
|
+
/**
|
|
27
|
+
* Zod schema for OpenTelemetry plugin environment variables.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Extends the base Powerlines {@link envSchema} with OTEL-specific configuration.
|
|
31
|
+
*/
|
|
32
|
+
declare const openTelemetryEnvSchema: z.ZodObject<{
|
|
33
|
+
APP_NAME: z.ZodString;
|
|
34
|
+
APP_VERSION: z.ZodDefault<z.ZodString>;
|
|
35
|
+
BUILD_ID: z.ZodString;
|
|
36
|
+
BUILD_TIMESTAMP: z.ZodString;
|
|
37
|
+
BUILD_CHECKSUM: z.ZodString;
|
|
38
|
+
RELEASE_ID: z.ZodString;
|
|
39
|
+
RELEASE_TAG: z.ZodString;
|
|
40
|
+
ORGANIZATION: z.ZodString;
|
|
41
|
+
PLATFORM: z.ZodDefault<z.ZodEnum<{
|
|
42
|
+
browser: "browser";
|
|
43
|
+
node: "node";
|
|
44
|
+
neutral: "neutral";
|
|
45
|
+
}>>;
|
|
46
|
+
MODE: z.ZodDefault<z.ZodEnum<{
|
|
47
|
+
development: "development";
|
|
48
|
+
test: "test";
|
|
49
|
+
production: "production";
|
|
50
|
+
}>>;
|
|
51
|
+
ENVIRONMENT: z.ZodDefault<z.ZodString>;
|
|
52
|
+
DEBUG: z.ZodBoolean;
|
|
53
|
+
TEST: z.ZodBoolean;
|
|
54
|
+
MINIMAL: z.ZodBoolean;
|
|
55
|
+
NO_COLOR: z.ZodBoolean;
|
|
56
|
+
FORCE_COLOR: z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber]>;
|
|
57
|
+
FORCE_HYPERLINK: z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber]>;
|
|
58
|
+
AGENT_NAME: z.ZodOptional<z.ZodString>;
|
|
59
|
+
COLORTERM: z.ZodOptional<z.ZodString>;
|
|
60
|
+
TERM: z.ZodOptional<z.ZodString>;
|
|
61
|
+
TERM_PROGRAM: z.ZodOptional<z.ZodString>;
|
|
62
|
+
TERM_PROGRAM_VERSION: z.ZodOptional<z.ZodString>;
|
|
63
|
+
TERMINAL_EMULATOR: z.ZodOptional<z.ZodString>;
|
|
64
|
+
WT_SESSION: z.ZodOptional<z.ZodString>;
|
|
65
|
+
TERMINUS_SUBLIME: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
ConEmuTask: z.ZodOptional<z.ZodString>;
|
|
67
|
+
CURSOR_TRACE_ID: z.ZodOptional<z.ZodString>;
|
|
68
|
+
VTE_VERSION: z.ZodOptional<z.ZodString>;
|
|
69
|
+
STACKTRACE: z.ZodBoolean;
|
|
70
|
+
INCLUDE_ERROR_DATA: z.ZodBoolean;
|
|
71
|
+
ERROR_URL: z.ZodOptional<z.ZodString>;
|
|
72
|
+
DEFAULT_TIMEZONE: z.ZodDefault<z.ZodString>;
|
|
73
|
+
DEFAULT_LOCALE: z.ZodDefault<z.ZodString>;
|
|
74
|
+
LOG_LEVEL: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
|
|
75
|
+
error: "error";
|
|
76
|
+
warn: "warn";
|
|
77
|
+
info: "info";
|
|
78
|
+
debug: "debug";
|
|
79
|
+
}>>>;
|
|
80
|
+
CI: z.ZodBoolean;
|
|
81
|
+
RUN_ID: z.ZodOptional<z.ZodString>;
|
|
82
|
+
AGOLA_GIT_REF: z.ZodOptional<z.ZodString>;
|
|
83
|
+
AC_APPCIRCLE: z.ZodOptional<z.ZodString>;
|
|
84
|
+
APPVEYOR: z.ZodOptional<z.ZodString>;
|
|
85
|
+
CODEBUILD: z.ZodOptional<z.ZodString>;
|
|
86
|
+
TF_BUILD: z.ZodOptional<z.ZodString>;
|
|
87
|
+
bamboo_planKey: z.ZodOptional<z.ZodString>;
|
|
88
|
+
BITBUCKET_COMMIT: z.ZodOptional<z.ZodString>;
|
|
89
|
+
BITRISE_IO: z.ZodOptional<z.ZodString>;
|
|
90
|
+
BUDDY_WORKSPACE_ID: z.ZodOptional<z.ZodString>;
|
|
91
|
+
BUILDKITE: z.ZodOptional<z.ZodString>;
|
|
92
|
+
CIRCLECI: z.ZodOptional<z.ZodString>;
|
|
93
|
+
CIRRUS_CI: z.ZodOptional<z.ZodString>;
|
|
94
|
+
CF_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
95
|
+
CM_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
96
|
+
CI_NAME: z.ZodOptional<z.ZodString>;
|
|
97
|
+
DRONE: z.ZodOptional<z.ZodString>;
|
|
98
|
+
DSARI: z.ZodOptional<z.ZodString>;
|
|
99
|
+
EARTHLY_CI: z.ZodOptional<z.ZodString>;
|
|
100
|
+
EAS_BUILD: z.ZodOptional<z.ZodString>;
|
|
101
|
+
GERRIT_PROJECT: z.ZodOptional<z.ZodString>;
|
|
102
|
+
GITEA_ACTIONS: z.ZodOptional<z.ZodString>;
|
|
103
|
+
GITHUB_ACTIONS: z.ZodOptional<z.ZodString>;
|
|
104
|
+
GITLAB_CI: z.ZodOptional<z.ZodString>;
|
|
105
|
+
GOCD: z.ZodOptional<z.ZodString>;
|
|
106
|
+
BUILDER_OUTPUT: z.ZodOptional<z.ZodString>;
|
|
107
|
+
HARNESS_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
108
|
+
JENKINS_URL: z.ZodOptional<z.ZodString>;
|
|
109
|
+
LAYERCI: z.ZodOptional<z.ZodString>;
|
|
110
|
+
MAGNUM: z.ZodOptional<z.ZodString>;
|
|
111
|
+
NETLIFY: z.ZodOptional<z.ZodString>;
|
|
112
|
+
NEVERCODE: z.ZodOptional<z.ZodString>;
|
|
113
|
+
PROW_JOB_ID: z.ZodOptional<z.ZodString>;
|
|
114
|
+
RELEASE_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
115
|
+
RENDER: z.ZodOptional<z.ZodString>;
|
|
116
|
+
SAILCI: z.ZodOptional<z.ZodString>;
|
|
117
|
+
HUDSON: z.ZodOptional<z.ZodString>;
|
|
118
|
+
SCREWDRIVER: z.ZodOptional<z.ZodString>;
|
|
119
|
+
SEMAPHORE: z.ZodOptional<z.ZodString>;
|
|
120
|
+
SOURCEHUT: z.ZodOptional<z.ZodString>;
|
|
121
|
+
SPACESHIP_CI: z.ZodOptional<z.ZodString>;
|
|
122
|
+
STRIDER: z.ZodOptional<z.ZodString>;
|
|
123
|
+
TASK_ID: z.ZodOptional<z.ZodString>;
|
|
124
|
+
TEAMCITY_VERSION: z.ZodOptional<z.ZodString>;
|
|
125
|
+
TRAVIS: z.ZodOptional<z.ZodString>;
|
|
126
|
+
VELA: z.ZodOptional<z.ZodString>;
|
|
127
|
+
NOW_BUILDER: z.ZodOptional<z.ZodString>;
|
|
128
|
+
APPCENTER_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
129
|
+
CI_XCODE_PROJECT: z.ZodOptional<z.ZodString>;
|
|
130
|
+
XCS: z.ZodOptional<z.ZodString>;
|
|
131
|
+
DATA_DIR: z.ZodOptional<z.ZodString>;
|
|
132
|
+
CONFIG_DIR: z.ZodOptional<z.ZodString>;
|
|
133
|
+
CACHE_DIR: z.ZodOptional<z.ZodString>;
|
|
134
|
+
LOG_DIR: z.ZodOptional<z.ZodString>;
|
|
135
|
+
TEMP_DIR: z.ZodOptional<z.ZodString>;
|
|
136
|
+
LOCALAPPDATA: z.ZodOptional<z.ZodString>;
|
|
137
|
+
APPDATA: z.ZodOptional<z.ZodString>;
|
|
138
|
+
XDG_DATA_HOME: z.ZodOptional<z.ZodString>;
|
|
139
|
+
XDG_CONFIG_HOME: z.ZodOptional<z.ZodString>;
|
|
140
|
+
XDG_CACHE_HOME: z.ZodOptional<z.ZodString>;
|
|
141
|
+
XDG_STATE_HOME: z.ZodOptional<z.ZodString>;
|
|
142
|
+
XDG_RUNTIME_DIR: z.ZodOptional<z.ZodString>;
|
|
143
|
+
DEVENV_RUNTIME: z.ZodOptional<z.ZodString>;
|
|
144
|
+
OTEL_SERVICE_NAME: z.ZodOptional<z.ZodString>;
|
|
145
|
+
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: z.ZodDefault<z.ZodString>;
|
|
146
|
+
OTEL_TRACES_SAMPLER: z.ZodDefault<z.ZodEnum<{
|
|
147
|
+
always_on: "always_on";
|
|
148
|
+
always_off: "always_off";
|
|
149
|
+
traceidratio: "traceidratio";
|
|
150
|
+
parentbased_traceidratio: "parentbased_traceidratio";
|
|
151
|
+
}>>;
|
|
152
|
+
OTEL_TRACES_SAMPLER_ARG: z.ZodDefault<z.ZodNumber>;
|
|
153
|
+
OTEL_EXPORTER_TYPES: z.ZodDefault<z.ZodString>;
|
|
154
|
+
OTEL_PROPAGATORS: z.ZodDefault<z.ZodString>;
|
|
155
|
+
OTEL_INSTRUMENTATIONS: z.ZodDefault<z.ZodString>;
|
|
156
|
+
OTEL_LOG_LEVEL: z.ZodDefault<z.ZodEnum<{
|
|
157
|
+
ALL: "ALL";
|
|
158
|
+
VERBOSE: "VERBOSE";
|
|
159
|
+
DEBUG: "DEBUG";
|
|
160
|
+
INFO: "INFO";
|
|
161
|
+
WARN: "WARN";
|
|
162
|
+
ERROR: "ERROR";
|
|
163
|
+
NONE: "NONE";
|
|
164
|
+
}>>;
|
|
165
|
+
OTEL_SDK_DISABLED: z.ZodDefault<z.ZodBoolean>;
|
|
166
|
+
RUNTIME: z.ZodDefault<z.ZodEnum<{
|
|
167
|
+
nodejs: "nodejs";
|
|
168
|
+
deno: "deno";
|
|
169
|
+
workerd: "workerd";
|
|
170
|
+
browser: "browser";
|
|
171
|
+
}>>;
|
|
172
|
+
}, z.core.$strip>;
|
|
173
|
+
/**
|
|
174
|
+
* Inferred OpenTelemetry environment configuration type from {@link openTelemetryEnvSchema}.
|
|
175
|
+
*/
|
|
176
|
+
type OpenTelemetryEnv = z.infer<typeof openTelemetryEnvSchema>;
|
|
177
|
+
//#endregion
|
|
178
|
+
export { OpenTelemetryEnv, OtelLogLevel, OtelLogLevelSchema, OtelTracesSampler, OtelTracesSamplerSchema, openTelemetryEnvSchema };
|
|
179
|
+
//# sourceMappingURL=env.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.cts","names":[],"sources":["../../src/schemas/env.ts"],"mappings":";;;;;cAwBa,yBAAuB,EAAA;;;;;;KAMxB,oBAAoB,EAAE,aAAa;;;;cAKlC,oBAAkB,EAAA;;;;;;;;;KASnB,eAAe,EAAE,aAAa;;;;;;;cAQ7B,wBAAsB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgE/B,EAAA,KAAA;;;;KAKQ,mBAAmB,EAAE,aAAa"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
//#region src/schemas/env.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Supported OpenTelemetry trace samplers.
|
|
5
|
+
*/
|
|
6
|
+
declare const OtelTracesSamplerSchema: z.ZodEnum<{
|
|
7
|
+
always_on: "always_on";
|
|
8
|
+
always_off: "always_off";
|
|
9
|
+
traceidratio: "traceidratio";
|
|
10
|
+
parentbased_traceidratio: "parentbased_traceidratio";
|
|
11
|
+
}>;
|
|
12
|
+
type OtelTracesSampler = z.infer<typeof OtelTracesSamplerSchema>;
|
|
13
|
+
/**
|
|
14
|
+
* OpenTelemetry SDK diagnostic log levels.
|
|
15
|
+
*/
|
|
16
|
+
declare const OtelLogLevelSchema: z.ZodEnum<{
|
|
17
|
+
ALL: "ALL";
|
|
18
|
+
VERBOSE: "VERBOSE";
|
|
19
|
+
DEBUG: "DEBUG";
|
|
20
|
+
INFO: "INFO";
|
|
21
|
+
WARN: "WARN";
|
|
22
|
+
ERROR: "ERROR";
|
|
23
|
+
NONE: "NONE";
|
|
24
|
+
}>;
|
|
25
|
+
type OtelLogLevel = z.infer<typeof OtelLogLevelSchema>;
|
|
26
|
+
/**
|
|
27
|
+
* Zod schema for OpenTelemetry plugin environment variables.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Extends the base Powerlines {@link envSchema} with OTEL-specific configuration.
|
|
31
|
+
*/
|
|
32
|
+
declare const openTelemetryEnvSchema: z.ZodObject<{
|
|
33
|
+
APP_NAME: z.ZodString;
|
|
34
|
+
APP_VERSION: z.ZodDefault<z.ZodString>;
|
|
35
|
+
BUILD_ID: z.ZodString;
|
|
36
|
+
BUILD_TIMESTAMP: z.ZodString;
|
|
37
|
+
BUILD_CHECKSUM: z.ZodString;
|
|
38
|
+
RELEASE_ID: z.ZodString;
|
|
39
|
+
RELEASE_TAG: z.ZodString;
|
|
40
|
+
ORGANIZATION: z.ZodString;
|
|
41
|
+
PLATFORM: z.ZodDefault<z.ZodEnum<{
|
|
42
|
+
browser: "browser";
|
|
43
|
+
node: "node";
|
|
44
|
+
neutral: "neutral";
|
|
45
|
+
}>>;
|
|
46
|
+
MODE: z.ZodDefault<z.ZodEnum<{
|
|
47
|
+
development: "development";
|
|
48
|
+
test: "test";
|
|
49
|
+
production: "production";
|
|
50
|
+
}>>;
|
|
51
|
+
ENVIRONMENT: z.ZodDefault<z.ZodString>;
|
|
52
|
+
DEBUG: z.ZodBoolean;
|
|
53
|
+
TEST: z.ZodBoolean;
|
|
54
|
+
MINIMAL: z.ZodBoolean;
|
|
55
|
+
NO_COLOR: z.ZodBoolean;
|
|
56
|
+
FORCE_COLOR: z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber]>;
|
|
57
|
+
FORCE_HYPERLINK: z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber]>;
|
|
58
|
+
AGENT_NAME: z.ZodOptional<z.ZodString>;
|
|
59
|
+
COLORTERM: z.ZodOptional<z.ZodString>;
|
|
60
|
+
TERM: z.ZodOptional<z.ZodString>;
|
|
61
|
+
TERM_PROGRAM: z.ZodOptional<z.ZodString>;
|
|
62
|
+
TERM_PROGRAM_VERSION: z.ZodOptional<z.ZodString>;
|
|
63
|
+
TERMINAL_EMULATOR: z.ZodOptional<z.ZodString>;
|
|
64
|
+
WT_SESSION: z.ZodOptional<z.ZodString>;
|
|
65
|
+
TERMINUS_SUBLIME: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
ConEmuTask: z.ZodOptional<z.ZodString>;
|
|
67
|
+
CURSOR_TRACE_ID: z.ZodOptional<z.ZodString>;
|
|
68
|
+
VTE_VERSION: z.ZodOptional<z.ZodString>;
|
|
69
|
+
STACKTRACE: z.ZodBoolean;
|
|
70
|
+
INCLUDE_ERROR_DATA: z.ZodBoolean;
|
|
71
|
+
ERROR_URL: z.ZodOptional<z.ZodString>;
|
|
72
|
+
DEFAULT_TIMEZONE: z.ZodDefault<z.ZodString>;
|
|
73
|
+
DEFAULT_LOCALE: z.ZodDefault<z.ZodString>;
|
|
74
|
+
LOG_LEVEL: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
|
|
75
|
+
error: "error";
|
|
76
|
+
warn: "warn";
|
|
77
|
+
info: "info";
|
|
78
|
+
debug: "debug";
|
|
79
|
+
}>>>;
|
|
80
|
+
CI: z.ZodBoolean;
|
|
81
|
+
RUN_ID: z.ZodOptional<z.ZodString>;
|
|
82
|
+
AGOLA_GIT_REF: z.ZodOptional<z.ZodString>;
|
|
83
|
+
AC_APPCIRCLE: z.ZodOptional<z.ZodString>;
|
|
84
|
+
APPVEYOR: z.ZodOptional<z.ZodString>;
|
|
85
|
+
CODEBUILD: z.ZodOptional<z.ZodString>;
|
|
86
|
+
TF_BUILD: z.ZodOptional<z.ZodString>;
|
|
87
|
+
bamboo_planKey: z.ZodOptional<z.ZodString>;
|
|
88
|
+
BITBUCKET_COMMIT: z.ZodOptional<z.ZodString>;
|
|
89
|
+
BITRISE_IO: z.ZodOptional<z.ZodString>;
|
|
90
|
+
BUDDY_WORKSPACE_ID: z.ZodOptional<z.ZodString>;
|
|
91
|
+
BUILDKITE: z.ZodOptional<z.ZodString>;
|
|
92
|
+
CIRCLECI: z.ZodOptional<z.ZodString>;
|
|
93
|
+
CIRRUS_CI: z.ZodOptional<z.ZodString>;
|
|
94
|
+
CF_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
95
|
+
CM_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
96
|
+
CI_NAME: z.ZodOptional<z.ZodString>;
|
|
97
|
+
DRONE: z.ZodOptional<z.ZodString>;
|
|
98
|
+
DSARI: z.ZodOptional<z.ZodString>;
|
|
99
|
+
EARTHLY_CI: z.ZodOptional<z.ZodString>;
|
|
100
|
+
EAS_BUILD: z.ZodOptional<z.ZodString>;
|
|
101
|
+
GERRIT_PROJECT: z.ZodOptional<z.ZodString>;
|
|
102
|
+
GITEA_ACTIONS: z.ZodOptional<z.ZodString>;
|
|
103
|
+
GITHUB_ACTIONS: z.ZodOptional<z.ZodString>;
|
|
104
|
+
GITLAB_CI: z.ZodOptional<z.ZodString>;
|
|
105
|
+
GOCD: z.ZodOptional<z.ZodString>;
|
|
106
|
+
BUILDER_OUTPUT: z.ZodOptional<z.ZodString>;
|
|
107
|
+
HARNESS_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
108
|
+
JENKINS_URL: z.ZodOptional<z.ZodString>;
|
|
109
|
+
LAYERCI: z.ZodOptional<z.ZodString>;
|
|
110
|
+
MAGNUM: z.ZodOptional<z.ZodString>;
|
|
111
|
+
NETLIFY: z.ZodOptional<z.ZodString>;
|
|
112
|
+
NEVERCODE: z.ZodOptional<z.ZodString>;
|
|
113
|
+
PROW_JOB_ID: z.ZodOptional<z.ZodString>;
|
|
114
|
+
RELEASE_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
115
|
+
RENDER: z.ZodOptional<z.ZodString>;
|
|
116
|
+
SAILCI: z.ZodOptional<z.ZodString>;
|
|
117
|
+
HUDSON: z.ZodOptional<z.ZodString>;
|
|
118
|
+
SCREWDRIVER: z.ZodOptional<z.ZodString>;
|
|
119
|
+
SEMAPHORE: z.ZodOptional<z.ZodString>;
|
|
120
|
+
SOURCEHUT: z.ZodOptional<z.ZodString>;
|
|
121
|
+
SPACESHIP_CI: z.ZodOptional<z.ZodString>;
|
|
122
|
+
STRIDER: z.ZodOptional<z.ZodString>;
|
|
123
|
+
TASK_ID: z.ZodOptional<z.ZodString>;
|
|
124
|
+
TEAMCITY_VERSION: z.ZodOptional<z.ZodString>;
|
|
125
|
+
TRAVIS: z.ZodOptional<z.ZodString>;
|
|
126
|
+
VELA: z.ZodOptional<z.ZodString>;
|
|
127
|
+
NOW_BUILDER: z.ZodOptional<z.ZodString>;
|
|
128
|
+
APPCENTER_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
129
|
+
CI_XCODE_PROJECT: z.ZodOptional<z.ZodString>;
|
|
130
|
+
XCS: z.ZodOptional<z.ZodString>;
|
|
131
|
+
DATA_DIR: z.ZodOptional<z.ZodString>;
|
|
132
|
+
CONFIG_DIR: z.ZodOptional<z.ZodString>;
|
|
133
|
+
CACHE_DIR: z.ZodOptional<z.ZodString>;
|
|
134
|
+
LOG_DIR: z.ZodOptional<z.ZodString>;
|
|
135
|
+
TEMP_DIR: z.ZodOptional<z.ZodString>;
|
|
136
|
+
LOCALAPPDATA: z.ZodOptional<z.ZodString>;
|
|
137
|
+
APPDATA: z.ZodOptional<z.ZodString>;
|
|
138
|
+
XDG_DATA_HOME: z.ZodOptional<z.ZodString>;
|
|
139
|
+
XDG_CONFIG_HOME: z.ZodOptional<z.ZodString>;
|
|
140
|
+
XDG_CACHE_HOME: z.ZodOptional<z.ZodString>;
|
|
141
|
+
XDG_STATE_HOME: z.ZodOptional<z.ZodString>;
|
|
142
|
+
XDG_RUNTIME_DIR: z.ZodOptional<z.ZodString>;
|
|
143
|
+
DEVENV_RUNTIME: z.ZodOptional<z.ZodString>;
|
|
144
|
+
OTEL_SERVICE_NAME: z.ZodOptional<z.ZodString>;
|
|
145
|
+
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: z.ZodDefault<z.ZodString>;
|
|
146
|
+
OTEL_TRACES_SAMPLER: z.ZodDefault<z.ZodEnum<{
|
|
147
|
+
always_on: "always_on";
|
|
148
|
+
always_off: "always_off";
|
|
149
|
+
traceidratio: "traceidratio";
|
|
150
|
+
parentbased_traceidratio: "parentbased_traceidratio";
|
|
151
|
+
}>>;
|
|
152
|
+
OTEL_TRACES_SAMPLER_ARG: z.ZodDefault<z.ZodNumber>;
|
|
153
|
+
OTEL_EXPORTER_TYPES: z.ZodDefault<z.ZodString>;
|
|
154
|
+
OTEL_PROPAGATORS: z.ZodDefault<z.ZodString>;
|
|
155
|
+
OTEL_INSTRUMENTATIONS: z.ZodDefault<z.ZodString>;
|
|
156
|
+
OTEL_LOG_LEVEL: z.ZodDefault<z.ZodEnum<{
|
|
157
|
+
ALL: "ALL";
|
|
158
|
+
VERBOSE: "VERBOSE";
|
|
159
|
+
DEBUG: "DEBUG";
|
|
160
|
+
INFO: "INFO";
|
|
161
|
+
WARN: "WARN";
|
|
162
|
+
ERROR: "ERROR";
|
|
163
|
+
NONE: "NONE";
|
|
164
|
+
}>>;
|
|
165
|
+
OTEL_SDK_DISABLED: z.ZodDefault<z.ZodBoolean>;
|
|
166
|
+
RUNTIME: z.ZodDefault<z.ZodEnum<{
|
|
167
|
+
nodejs: "nodejs";
|
|
168
|
+
deno: "deno";
|
|
169
|
+
workerd: "workerd";
|
|
170
|
+
browser: "browser";
|
|
171
|
+
}>>;
|
|
172
|
+
}, z.core.$strip>;
|
|
173
|
+
/**
|
|
174
|
+
* Inferred OpenTelemetry environment configuration type from {@link openTelemetryEnvSchema}.
|
|
175
|
+
*/
|
|
176
|
+
type OpenTelemetryEnv = z.infer<typeof openTelemetryEnvSchema>;
|
|
177
|
+
//#endregion
|
|
178
|
+
export { OpenTelemetryEnv, OtelLogLevel, OtelLogLevelSchema, OtelTracesSampler, OtelTracesSamplerSchema, openTelemetryEnvSchema };
|
|
179
|
+
//# sourceMappingURL=env.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.mts","names":[],"sources":["../../src/
|
|
1
|
+
{"version":3,"file":"env.d.mts","names":[],"sources":["../../src/schemas/env.ts"],"mappings":""}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { RuntimeSchema, envSchema } from "@powerlines/plugin-env/schemas/env";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/schemas/env.ts
|
|
5
|
+
/**
|
|
6
|
+
* Supported OpenTelemetry trace samplers.
|
|
7
|
+
*/
|
|
8
|
+
const OtelTracesSamplerSchema = z.enum([
|
|
9
|
+
"always_on",
|
|
10
|
+
"always_off",
|
|
11
|
+
"traceidratio",
|
|
12
|
+
"parentbased_traceidratio"
|
|
13
|
+
]);
|
|
14
|
+
/**
|
|
15
|
+
* OpenTelemetry SDK diagnostic log levels.
|
|
16
|
+
*/
|
|
17
|
+
const OtelLogLevelSchema = z.enum([
|
|
18
|
+
"ALL",
|
|
19
|
+
"VERBOSE",
|
|
20
|
+
"DEBUG",
|
|
21
|
+
"INFO",
|
|
22
|
+
"WARN",
|
|
23
|
+
"ERROR",
|
|
24
|
+
"NONE"
|
|
25
|
+
]);
|
|
26
|
+
/**
|
|
27
|
+
* Zod schema for OpenTelemetry plugin environment variables.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Extends the base Powerlines {@link envSchema} with OTEL-specific configuration.
|
|
31
|
+
*/
|
|
32
|
+
const openTelemetryEnvSchema = envSchema.extend({
|
|
33
|
+
OTEL_SERVICE_NAME: z.string().optional().meta({
|
|
34
|
+
description: "The name of the service. If none if provided, the plugin will attempt to use the value of the APP_NAME configuration option.",
|
|
35
|
+
readonly: true
|
|
36
|
+
}),
|
|
37
|
+
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: z.string().default("http://localhost:4318/v1/traces").meta({
|
|
38
|
+
description: "The OTLP traces endpoint URL.",
|
|
39
|
+
defaultValue: "http://localhost:4318/v1/traces",
|
|
40
|
+
readonly: true
|
|
41
|
+
}),
|
|
42
|
+
OTEL_TRACES_SAMPLER: OtelTracesSamplerSchema.default("always_on").meta({
|
|
43
|
+
description: "The supported trace sampler to use.",
|
|
44
|
+
defaultValue: "always_on",
|
|
45
|
+
readonly: true
|
|
46
|
+
}),
|
|
47
|
+
OTEL_TRACES_SAMPLER_ARG: z.number().default(1).meta({
|
|
48
|
+
description: "The argument for the trace sampler. For example, if using the \"traceidratio\" sampler, this would be a number between 0 and 1 representing the sampling ratio.",
|
|
49
|
+
defaultValue: 1,
|
|
50
|
+
readonly: true
|
|
51
|
+
}),
|
|
52
|
+
OTEL_EXPORTER_TYPES: z.string().default("http").meta({
|
|
53
|
+
description: "A comma-separated list of trace exporter types to use. Supported values include \"http\" and \"console\".",
|
|
54
|
+
defaultValue: "http",
|
|
55
|
+
readonly: true
|
|
56
|
+
}),
|
|
57
|
+
OTEL_PROPAGATORS: z.string().default("tracecontext,baggage").meta({
|
|
58
|
+
description: "A comma-separated list of trace propagator types to use. Supported values include \"tracecontext\" and \"baggage\".",
|
|
59
|
+
defaultValue: "tracecontext,baggage",
|
|
60
|
+
readonly: true
|
|
61
|
+
}),
|
|
62
|
+
OTEL_INSTRUMENTATIONS: z.string().default("http,express").meta({
|
|
63
|
+
description: "A comma-separated list of trace instrumentations to use. Supported values include \"http\", \"express\", and \"graphql\".",
|
|
64
|
+
defaultValue: "http,express",
|
|
65
|
+
readonly: true
|
|
66
|
+
}),
|
|
67
|
+
OTEL_LOG_LEVEL: OtelLogLevelSchema.default("INFO").meta({
|
|
68
|
+
description: "The log level for OpenTelemetry SDK diagnostics. If not set, the LOG_LEVEL variable will be used to determine the log level for diagnostics.",
|
|
69
|
+
defaultValue: "INFO",
|
|
70
|
+
readonly: true
|
|
71
|
+
}),
|
|
72
|
+
OTEL_SDK_DISABLED: z.boolean().default(false).meta({
|
|
73
|
+
description: "A boolean flag to disable the OpenTelemetry SDK. When set to \"true\", the plugin will not inject any OpenTelemetry code or configuration into the application.",
|
|
74
|
+
defaultValue: false,
|
|
75
|
+
readonly: true
|
|
76
|
+
}),
|
|
77
|
+
RUNTIME: RuntimeSchema.default("nodejs").meta({
|
|
78
|
+
description: "The runtime that the application is running in.",
|
|
79
|
+
defaultValue: "nodejs"
|
|
80
|
+
})
|
|
81
|
+
}).meta({ description: "The base environment configuration used by Powerlines applications with OpenTelemetry. This schema defines the environment variables, configuration options, and runtime settings used by applications." });
|
|
82
|
+
/**
|
|
83
|
+
* Inferred OpenTelemetry environment configuration type from {@link openTelemetryEnvSchema}.
|
|
84
|
+
*/
|
|
85
|
+
//#endregion
|
|
86
|
+
export { OtelLogLevelSchema, OtelTracesSamplerSchema, openTelemetryEnvSchema };
|
|
87
|
+
//# sourceMappingURL=env.mjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_schemas_env = require('./env.cjs');
|
|
3
|
+
|
|
4
|
+
exports.OtelLogLevelSchema = require_schemas_env.OtelLogLevelSchema;
|
|
5
|
+
exports.OtelTracesSamplerSchema = require_schemas_env.OtelTracesSamplerSchema;
|
|
6
|
+
exports.openTelemetryEnvSchema = require_schemas_env.openTelemetryEnvSchema;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { OpenTelemetryEnv, OtelLogLevel, OtelLogLevelSchema, OtelTracesSampler, OtelTracesSamplerSchema, openTelemetryEnvSchema } from "./env.cjs";
|
|
2
|
+
export { OpenTelemetryEnv, OtelLogLevel, OtelLogLevelSchema, OtelTracesSampler, OtelTracesSamplerSchema, openTelemetryEnvSchema };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { OpenTelemetryEnv, OtelLogLevel, OtelLogLevelSchema, OtelTracesSampler, OtelTracesSamplerSchema, openTelemetryEnvSchema } from "./env.mjs";
|
|
2
|
+
export { OpenTelemetryEnv, OtelLogLevel, OtelLogLevelSchema, OtelTracesSampler, OtelTracesSamplerSchema, openTelemetryEnvSchema };
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { AttributesFromHeaderFunc, AttributesFromHeaders, Configuration, FetchInstrumentationConfig, InstrumentationConfiguration, InstrumentationOptionOrName, OTLPExporterConfig, OpenTelemetryPluginContext, OpenTelemetryPluginOptions, OpenTelemetryPluginResolvedConfig, OpenTelemetryPluginUserConfig, PropagatorOrName, SampleOrName, SpanExporterOrName, SpanProcessorOrName } from "./plugin.cjs";
|
|
2
|
-
|
|
3
|
-
export { AttributesFromHeaderFunc, AttributesFromHeaders, Configuration, FetchInstrumentationConfig, InstrumentationConfiguration, InstrumentationOptionOrName, OTLPExporterConfig, OpenTelemetryEnv, OpenTelemetryPluginContext, OpenTelemetryPluginOptions, OpenTelemetryPluginResolvedConfig, OpenTelemetryPluginUserConfig, PropagatorOrName, SampleOrName, SpanExporterOrName, SpanProcessorOrName };
|
|
2
|
+
export { AttributesFromHeaderFunc, AttributesFromHeaders, Configuration, FetchInstrumentationConfig, InstrumentationConfiguration, InstrumentationOptionOrName, OTLPExporterConfig, OpenTelemetryPluginContext, OpenTelemetryPluginOptions, OpenTelemetryPluginResolvedConfig, OpenTelemetryPluginUserConfig, PropagatorOrName, SampleOrName, SpanExporterOrName, SpanProcessorOrName };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { AttributesFromHeaderFunc, AttributesFromHeaders, Configuration, FetchInstrumentationConfig, InstrumentationConfiguration, InstrumentationOptionOrName, OTLPExporterConfig, OpenTelemetryPluginContext, OpenTelemetryPluginOptions, OpenTelemetryPluginResolvedConfig, OpenTelemetryPluginUserConfig, PropagatorOrName, SampleOrName, SpanExporterOrName, SpanProcessorOrName } from "./plugin.mjs";
|
|
2
|
-
|
|
3
|
-
export { AttributesFromHeaderFunc, AttributesFromHeaders, Configuration, FetchInstrumentationConfig, InstrumentationConfiguration, InstrumentationOptionOrName, OTLPExporterConfig, OpenTelemetryEnv, OpenTelemetryPluginContext, OpenTelemetryPluginOptions, OpenTelemetryPluginResolvedConfig, OpenTelemetryPluginUserConfig, PropagatorOrName, SampleOrName, SpanExporterOrName, SpanProcessorOrName };
|
|
2
|
+
export { AttributesFromHeaderFunc, AttributesFromHeaders, Configuration, FetchInstrumentationConfig, InstrumentationConfiguration, InstrumentationOptionOrName, OTLPExporterConfig, OpenTelemetryPluginContext, OpenTelemetryPluginOptions, OpenTelemetryPluginResolvedConfig, OpenTelemetryPluginUserConfig, PropagatorOrName, SampleOrName, SpanExporterOrName, SpanProcessorOrName };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-open-telemetry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.186",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Powerlines plugin for registering OpenTelemetry integration at runtime.",
|
|
6
6
|
"keywords": [
|
|
@@ -117,32 +117,46 @@
|
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
119
|
"./package.json": "./package.json",
|
|
120
|
-
"./
|
|
120
|
+
"./schemas": {
|
|
121
121
|
"require": {
|
|
122
|
-
"types": "./dist/
|
|
123
|
-
"default": "./dist/
|
|
122
|
+
"types": "./dist/schemas/index.d.cts",
|
|
123
|
+
"default": "./dist/schemas/index.cjs"
|
|
124
124
|
},
|
|
125
125
|
"import": {
|
|
126
|
-
"types": "./dist/
|
|
127
|
-
"default": "./dist/
|
|
126
|
+
"types": "./dist/schemas/index.d.mts",
|
|
127
|
+
"default": "./dist/schemas/index.mjs"
|
|
128
128
|
},
|
|
129
129
|
"default": {
|
|
130
|
-
"types": "./dist/
|
|
131
|
-
"default": "./dist/
|
|
130
|
+
"types": "./dist/schemas/index.d.mts",
|
|
131
|
+
"default": "./dist/schemas/index.mjs"
|
|
132
132
|
}
|
|
133
133
|
},
|
|
134
|
-
"./
|
|
134
|
+
"./schemas/env": {
|
|
135
135
|
"require": {
|
|
136
|
-
"types": "./dist/
|
|
137
|
-
"default": "./dist/
|
|
136
|
+
"types": "./dist/schemas/env.d.cts",
|
|
137
|
+
"default": "./dist/schemas/env.cjs"
|
|
138
138
|
},
|
|
139
139
|
"import": {
|
|
140
|
-
"types": "./dist/
|
|
141
|
-
"default": "./dist/
|
|
140
|
+
"types": "./dist/schemas/env.d.mts",
|
|
141
|
+
"default": "./dist/schemas/env.mjs"
|
|
142
142
|
},
|
|
143
143
|
"default": {
|
|
144
|
-
"types": "./dist/
|
|
145
|
-
"default": "./dist/
|
|
144
|
+
"types": "./dist/schemas/env.d.mts",
|
|
145
|
+
"default": "./dist/schemas/env.mjs"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"./types": {
|
|
149
|
+
"require": {
|
|
150
|
+
"types": "./dist/types/index.d.cts",
|
|
151
|
+
"default": "./dist/types/index.cjs"
|
|
152
|
+
},
|
|
153
|
+
"import": {
|
|
154
|
+
"types": "./dist/types/index.d.mts",
|
|
155
|
+
"default": "./dist/types/index.mjs"
|
|
156
|
+
},
|
|
157
|
+
"default": {
|
|
158
|
+
"types": "./dist/types/index.d.mts",
|
|
159
|
+
"default": "./dist/types/index.mjs"
|
|
146
160
|
}
|
|
147
161
|
},
|
|
148
162
|
"./types/plugin": {
|
|
@@ -170,10 +184,11 @@
|
|
|
170
184
|
"@alloy-js/json": "^0.24.0",
|
|
171
185
|
"@alloy-js/markdown": "^0.24.0",
|
|
172
186
|
"@alloy-js/typescript": "^0.24.0",
|
|
173
|
-
"@power-plant/alloy-js": "^0.0.
|
|
174
|
-
"@powerlines/plugin-alloy": "^0.26.
|
|
175
|
-
"@powerlines/plugin-automd": "^0.1.
|
|
176
|
-
"@powerlines/plugin-
|
|
187
|
+
"@power-plant/alloy-js": "^0.0.38",
|
|
188
|
+
"@powerlines/plugin-alloy": "^0.26.254",
|
|
189
|
+
"@powerlines/plugin-automd": "^0.1.622",
|
|
190
|
+
"@powerlines/plugin-env": "^0.16.365",
|
|
191
|
+
"@powerlines/plugin-plugin": "^0.12.573",
|
|
177
192
|
"@storm-software/config-tools": "^1.190.109",
|
|
178
193
|
"@stryke/convert": "^0.7.29",
|
|
179
194
|
"@stryke/env": "^0.20.116",
|
|
@@ -186,7 +201,8 @@
|
|
|
186
201
|
"automd": "^0.4.3",
|
|
187
202
|
"c12": "^3.3.4",
|
|
188
203
|
"defu": "^6.1.7",
|
|
189
|
-
"powerlines": "^0.47.
|
|
204
|
+
"powerlines": "^0.47.161",
|
|
205
|
+
"zod": "^4.4.3"
|
|
190
206
|
},
|
|
191
207
|
"devDependencies": {
|
|
192
208
|
"@opentelemetry/api": "^1.9.1",
|
|
@@ -217,5 +233,5 @@
|
|
|
217
233
|
"@opentelemetry/sdk-trace-base": ">=2.0.0 <3.0.0"
|
|
218
234
|
},
|
|
219
235
|
"publishConfig": { "access": "public" },
|
|
220
|
-
"gitHead": "
|
|
236
|
+
"gitHead": "832ca45c23a4504eba7352bde30638a57ec27c3f"
|
|
221
237
|
}
|
package/dist/types/env.cjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/types/env.ts
|
|
3
|
-
/**
|
|
4
|
-
* The base environment configuration used by Powerlines applications
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* This interface is used to define the environment variables, configuration options, and runtime settings used by applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \`powerlines docs\` command.
|
|
8
|
-
*
|
|
9
|
-
* @categoryDescription Platform
|
|
10
|
-
* The name of the platform the configuration parameter is intended for use in.
|
|
11
|
-
*
|
|
12
|
-
* @showCategories
|
|
13
|
-
*/
|
|
14
|
-
//#endregion
|
package/dist/types/env.d.cts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { EnvInterface } from "@powerlines/plugin-env/types/env";
|
|
2
|
-
//#region src/types/env.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* The base environment configuration used by Powerlines applications
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* This interface is used to define the environment variables, configuration options, and runtime settings used by applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \`powerlines docs\` command.
|
|
8
|
-
*
|
|
9
|
-
* @categoryDescription Platform
|
|
10
|
-
* The name of the platform the configuration parameter is intended for use in.
|
|
11
|
-
*
|
|
12
|
-
* @showCategories
|
|
13
|
-
*/
|
|
14
|
-
interface OpenTelemetryEnv extends EnvInterface {
|
|
15
|
-
/**
|
|
16
|
-
* The name of the service. If none if provided, the plugin will attempt to use the value of the {@link EnvInterface.APP_NAME} configuration option.
|
|
17
|
-
*/
|
|
18
|
-
readonly OTEL_SERVICE_NAME?: string;
|
|
19
|
-
/**
|
|
20
|
-
* The OTLP traces endpoint URL.
|
|
21
|
-
*
|
|
22
|
-
* @defaultValue "http://localhost:4318/v1/traces"
|
|
23
|
-
*/
|
|
24
|
-
readonly OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: string;
|
|
25
|
-
/**
|
|
26
|
-
* The supported trace sampler to use.
|
|
27
|
-
*
|
|
28
|
-
* @defaultValue "always_on"
|
|
29
|
-
*/
|
|
30
|
-
readonly OTEL_TRACES_SAMPLER: "always_on" | "always_off" | "traceidratio" | "parentbased_traceidratio";
|
|
31
|
-
/**
|
|
32
|
-
* The argument for the trace sampler. For example, if using the "traceidratio" sampler, this would be a number between 0 and 1 representing the sampling ratio.
|
|
33
|
-
*
|
|
34
|
-
* @defaultValue 1
|
|
35
|
-
*/
|
|
36
|
-
readonly OTEL_TRACES_SAMPLER_ARG: number;
|
|
37
|
-
/**
|
|
38
|
-
* A comma-separated list of trace exporter types to use. Supported values include "http" and "console".
|
|
39
|
-
*
|
|
40
|
-
* @defaultValue "http"
|
|
41
|
-
*/
|
|
42
|
-
readonly OTEL_EXPORTER_TYPES?: string;
|
|
43
|
-
/**
|
|
44
|
-
* A comma-separated list of trace propagator types to use. Supported values include "tracecontext" and "baggage".
|
|
45
|
-
*
|
|
46
|
-
* @defaultValue "tracecontext,baggage"
|
|
47
|
-
*/
|
|
48
|
-
readonly OTEL_PROPAGATORS?: string;
|
|
49
|
-
/**
|
|
50
|
-
* A comma-separated list of trace instrumentations to use. Supported values include "http", "express", and "graphql".
|
|
51
|
-
*
|
|
52
|
-
* @defaultValue "http,express"
|
|
53
|
-
*/
|
|
54
|
-
readonly OTEL_INSTRUMENTATIONS?: string;
|
|
55
|
-
/**
|
|
56
|
-
* The log level for OpenTelemetry SDK diagnostics. If not set, the {@link EnvInterface.LOG_LEVEL} variable will be used to determine the log level for diagnostics.
|
|
57
|
-
*
|
|
58
|
-
* @defaultValue "INFO"
|
|
59
|
-
*/
|
|
60
|
-
readonly OTEL_LOG_LEVEL?: "ALL" | "VERBOSE" | "DEBUG" | "INFO" | "WARN" | "ERROR" | "NONE";
|
|
61
|
-
/**
|
|
62
|
-
* A boolean flag to disable the OpenTelemetry SDK. When set to "true", the plugin will not inject any OpenTelemetry code or configuration into the application.
|
|
63
|
-
*
|
|
64
|
-
* @defaultValue false
|
|
65
|
-
*/
|
|
66
|
-
readonly OTEL_SDK_DISABLED: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* The runtime that the application is running in.
|
|
69
|
-
*
|
|
70
|
-
* @defaultValue "nodejs"
|
|
71
|
-
*/
|
|
72
|
-
RUNTIME: "nodejs" | "deno" | "workerd" | "browser";
|
|
73
|
-
}
|
|
74
|
-
//#endregion
|
|
75
|
-
export { OpenTelemetryEnv };
|
|
76
|
-
//# sourceMappingURL=env.d.cts.map
|
package/dist/types/env.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.cts","names":[],"sources":["../../src/types/env.ts"],"mappings":";;;;;;;;;;;;;UA+BiB,yBAAyB;;;;WAI/B;;;;;;WAOA;;;;;;WAOA;;;;;;WAWA;;;;;;WAOA;;;;;;WAOA;;;;;;WAOA;;;;;;WAOA;;;;;;WAcA;;;;;;EAOT"}
|
package/dist/types/env.d.mts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { EnvInterface } from "@powerlines/plugin-env/types/env";
|
|
2
|
-
//#region src/types/env.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* The base environment configuration used by Powerlines applications
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* This interface is used to define the environment variables, configuration options, and runtime settings used by applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \`powerlines docs\` command.
|
|
8
|
-
*
|
|
9
|
-
* @categoryDescription Platform
|
|
10
|
-
* The name of the platform the configuration parameter is intended for use in.
|
|
11
|
-
*
|
|
12
|
-
* @showCategories
|
|
13
|
-
*/
|
|
14
|
-
interface OpenTelemetryEnv extends EnvInterface {
|
|
15
|
-
/**
|
|
16
|
-
* The name of the service. If none if provided, the plugin will attempt to use the value of the {@link EnvInterface.APP_NAME} configuration option.
|
|
17
|
-
*/
|
|
18
|
-
readonly OTEL_SERVICE_NAME?: string;
|
|
19
|
-
/**
|
|
20
|
-
* The OTLP traces endpoint URL.
|
|
21
|
-
*
|
|
22
|
-
* @defaultValue "http://localhost:4318/v1/traces"
|
|
23
|
-
*/
|
|
24
|
-
readonly OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: string;
|
|
25
|
-
/**
|
|
26
|
-
* The supported trace sampler to use.
|
|
27
|
-
*
|
|
28
|
-
* @defaultValue "always_on"
|
|
29
|
-
*/
|
|
30
|
-
readonly OTEL_TRACES_SAMPLER: "always_on" | "always_off" | "traceidratio" | "parentbased_traceidratio";
|
|
31
|
-
/**
|
|
32
|
-
* The argument for the trace sampler. For example, if using the "traceidratio" sampler, this would be a number between 0 and 1 representing the sampling ratio.
|
|
33
|
-
*
|
|
34
|
-
* @defaultValue 1
|
|
35
|
-
*/
|
|
36
|
-
readonly OTEL_TRACES_SAMPLER_ARG: number;
|
|
37
|
-
/**
|
|
38
|
-
* A comma-separated list of trace exporter types to use. Supported values include "http" and "console".
|
|
39
|
-
*
|
|
40
|
-
* @defaultValue "http"
|
|
41
|
-
*/
|
|
42
|
-
readonly OTEL_EXPORTER_TYPES?: string;
|
|
43
|
-
/**
|
|
44
|
-
* A comma-separated list of trace propagator types to use. Supported values include "tracecontext" and "baggage".
|
|
45
|
-
*
|
|
46
|
-
* @defaultValue "tracecontext,baggage"
|
|
47
|
-
*/
|
|
48
|
-
readonly OTEL_PROPAGATORS?: string;
|
|
49
|
-
/**
|
|
50
|
-
* A comma-separated list of trace instrumentations to use. Supported values include "http", "express", and "graphql".
|
|
51
|
-
*
|
|
52
|
-
* @defaultValue "http,express"
|
|
53
|
-
*/
|
|
54
|
-
readonly OTEL_INSTRUMENTATIONS?: string;
|
|
55
|
-
/**
|
|
56
|
-
* The log level for OpenTelemetry SDK diagnostics. If not set, the {@link EnvInterface.LOG_LEVEL} variable will be used to determine the log level for diagnostics.
|
|
57
|
-
*
|
|
58
|
-
* @defaultValue "INFO"
|
|
59
|
-
*/
|
|
60
|
-
readonly OTEL_LOG_LEVEL?: "ALL" | "VERBOSE" | "DEBUG" | "INFO" | "WARN" | "ERROR" | "NONE";
|
|
61
|
-
/**
|
|
62
|
-
* A boolean flag to disable the OpenTelemetry SDK. When set to "true", the plugin will not inject any OpenTelemetry code or configuration into the application.
|
|
63
|
-
*
|
|
64
|
-
* @defaultValue false
|
|
65
|
-
*/
|
|
66
|
-
readonly OTEL_SDK_DISABLED: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* The runtime that the application is running in.
|
|
69
|
-
*
|
|
70
|
-
* @defaultValue "nodejs"
|
|
71
|
-
*/
|
|
72
|
-
RUNTIME: "nodejs" | "deno" | "workerd" | "browser";
|
|
73
|
-
}
|
|
74
|
-
//#endregion
|
|
75
|
-
export { OpenTelemetryEnv };
|
|
76
|
-
//# sourceMappingURL=env.d.mts.map
|
package/dist/types/env.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region src/types/env.ts
|
|
2
|
-
/**
|
|
3
|
-
* The base environment configuration used by Powerlines applications
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* This interface is used to define the environment variables, configuration options, and runtime settings used by applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \`powerlines docs\` command.
|
|
7
|
-
*
|
|
8
|
-
* @categoryDescription Platform
|
|
9
|
-
* The name of the platform the configuration parameter is intended for use in.
|
|
10
|
-
*
|
|
11
|
-
* @showCategories
|
|
12
|
-
*/
|
|
13
|
-
//#endregion
|
|
14
|
-
export { };
|
|
15
|
-
//# sourceMappingURL=env.mjs.map
|
|
File without changes
|