@vibesdotdev/logging 0.0.2 → 1.0.0-rc.4
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/LICENSE +18 -0
- package/README.md +101 -8
- package/dist/audit/audit-retention.job.descriptor.d.ts +60 -0
- package/dist/audit/audit-retention.job.descriptor.d.ts.map +1 -0
- package/dist/audit/audit-retention.job.descriptor.js +42 -0
- package/dist/audit/audit-retention.job.descriptor.js.map +1 -0
- package/dist/audit/audit-retention.job.impl.d.ts +23 -0
- package/dist/audit/audit-retention.job.impl.d.ts.map +1 -0
- package/dist/audit/audit-retention.job.impl.js +24 -0
- package/dist/audit/audit-retention.job.impl.js.map +1 -0
- package/dist/audit/audit.descriptor.d.ts +6 -0
- package/dist/audit/audit.descriptor.d.ts.map +1 -1
- package/dist/audit/audit.descriptor.js +72 -5
- package/dist/audit/audit.descriptor.js.map +1 -1
- package/dist/audit/audit.storage.schema.d.ts +3 -3
- package/dist/audit/index.d.ts +3 -1
- package/dist/audit/index.d.ts.map +1 -1
- package/dist/audit/index.js +4 -1
- package/dist/audit/index.js.map +1 -1
- package/dist/audit/scheduled-audit-retention.d.ts +39 -0
- package/dist/audit/scheduled-audit-retention.d.ts.map +1 -0
- package/dist/audit/scheduled-audit-retention.js +38 -0
- package/dist/audit/scheduled-audit-retention.js.map +1 -0
- package/dist/browser/capture-error.d.ts +66 -0
- package/dist/browser/capture-error.d.ts.map +1 -0
- package/dist/browser/capture-error.js +82 -0
- package/dist/browser/capture-error.js.map +1 -0
- package/dist/browser/index.d.ts +11 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +16 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/logging-browser.plugin.d.ts +9 -0
- package/dist/browser/logging-browser.plugin.d.ts.map +1 -0
- package/dist/browser/logging-browser.plugin.js +26 -0
- package/dist/browser/logging-browser.plugin.js.map +1 -0
- package/dist/browser/plugin.d.ts +2 -0
- package/dist/browser/plugin.d.ts.map +1 -0
- package/dist/browser/plugin.js +2 -0
- package/dist/browser/plugin.js.map +1 -0
- package/dist/browser/read-errors.d.ts +26 -0
- package/dist/browser/read-errors.d.ts.map +1 -0
- package/dist/browser/read-errors.js +38 -0
- package/dist/browser/read-errors.js.map +1 -0
- package/dist/browser/sinks/browser/browser.browser.descriptor.d.ts +10 -0
- package/dist/browser/sinks/browser/browser.browser.descriptor.d.ts.map +1 -0
- package/dist/browser/sinks/browser/browser.browser.descriptor.js +23 -0
- package/dist/browser/sinks/browser/browser.browser.descriptor.js.map +1 -0
- package/dist/browser/sinks/browser/browser.impl.browser.d.ts +83 -0
- package/dist/browser/sinks/browser/browser.impl.browser.d.ts.map +1 -0
- package/dist/browser/sinks/browser/browser.impl.browser.js +247 -0
- package/dist/browser/sinks/browser/browser.impl.browser.js.map +1 -0
- package/dist/cli/failures.d.ts +29 -0
- package/dist/cli/failures.d.ts.map +1 -0
- package/dist/cli/failures.js +44 -0
- package/dist/cli/failures.js.map +1 -0
- package/dist/cli/flags.d.ts +24 -0
- package/dist/cli/flags.d.ts.map +1 -0
- package/dist/cli/flags.js +56 -0
- package/dist/cli/flags.js.map +1 -0
- package/dist/cli/log-line.d.ts +23 -0
- package/dist/cli/log-line.d.ts.map +1 -0
- package/dist/cli/log-line.js +39 -0
- package/dist/cli/log-line.js.map +1 -0
- package/dist/cli/logging.logs.descriptor.d.ts +9 -0
- package/dist/cli/logging.logs.descriptor.d.ts.map +1 -0
- package/dist/cli/logging.logs.descriptor.js +16 -0
- package/dist/cli/logging.logs.descriptor.js.map +1 -0
- package/dist/cli/logs.audit.cleanup.descriptor.d.ts +7 -0
- package/dist/cli/logs.audit.cleanup.descriptor.d.ts.map +1 -0
- package/dist/cli/logs.audit.cleanup.descriptor.js +21 -0
- package/dist/cli/logs.audit.cleanup.descriptor.js.map +1 -0
- package/dist/cli/logs.audit.cleanup.impl.d.ts +14 -0
- package/dist/cli/logs.audit.cleanup.impl.d.ts.map +1 -0
- package/dist/cli/logs.audit.cleanup.impl.js +60 -0
- package/dist/cli/logs.audit.cleanup.impl.js.map +1 -0
- package/dist/cli/logs.audit.descriptor.d.ts +9 -0
- package/dist/cli/logs.audit.descriptor.d.ts.map +1 -0
- package/dist/cli/logs.audit.descriptor.js +41 -0
- package/dist/cli/logs.audit.descriptor.js.map +1 -0
- package/dist/cli/logs.audit.group.descriptor.d.ts +7 -0
- package/dist/cli/logs.audit.group.descriptor.d.ts.map +1 -0
- package/dist/cli/logs.audit.group.descriptor.js +15 -0
- package/dist/cli/logs.audit.group.descriptor.js.map +1 -0
- package/dist/cli/logs.audit.impl.d.ts +19 -0
- package/dist/cli/logs.audit.impl.d.ts.map +1 -0
- package/dist/cli/logs.audit.impl.js +83 -0
- package/dist/cli/logs.audit.impl.js.map +1 -0
- package/dist/cli/logs.descriptor.d.ts +1 -8
- package/dist/cli/logs.descriptor.d.ts.map +1 -1
- package/dist/cli/logs.descriptor.js +1 -15
- package/dist/cli/logs.descriptor.js.map +1 -1
- package/dist/cli/logs.list.impl.d.ts +4 -1
- package/dist/cli/logs.list.impl.d.ts.map +1 -1
- package/dist/cli/logs.list.impl.js +60 -63
- package/dist/cli/logs.list.impl.js.map +1 -1
- package/dist/cli/logs.rotate.descriptor.d.ts.map +1 -1
- package/dist/cli/logs.rotate.descriptor.js +7 -3
- package/dist/cli/logs.rotate.descriptor.js.map +1 -1
- package/dist/cli/logs.rotate.impl.d.ts +3 -1
- package/dist/cli/logs.rotate.impl.d.ts.map +1 -1
- package/dist/cli/logs.rotate.impl.js +72 -33
- package/dist/cli/logs.rotate.impl.js.map +1 -1
- package/dist/cli/logs.search.descriptor.d.ts.map +1 -1
- package/dist/cli/logs.search.descriptor.js +4 -0
- package/dist/cli/logs.search.descriptor.js.map +1 -1
- package/dist/cli/logs.search.impl.d.ts +3 -1
- package/dist/cli/logs.search.impl.d.ts.map +1 -1
- package/dist/cli/logs.search.impl.js +114 -108
- package/dist/cli/logs.search.impl.js.map +1 -1
- package/dist/cli/logs.tail.descriptor.d.ts.map +1 -1
- package/dist/cli/logs.tail.descriptor.js +2 -1
- package/dist/cli/logs.tail.descriptor.js.map +1 -1
- package/dist/cli/logs.tail.impl.d.ts +4 -2
- package/dist/cli/logs.tail.impl.d.ts.map +1 -1
- package/dist/cli/logs.tail.impl.js +84 -57
- package/dist/cli/logs.tail.impl.js.map +1 -1
- package/dist/cli/logs.view.impl.d.ts +2 -6
- package/dist/cli/logs.view.impl.d.ts.map +1 -1
- package/dist/cli/logs.view.impl.js +32 -50
- package/dist/cli/logs.view.impl.js.map +1 -1
- package/dist/cli/output.d.ts +29 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +29 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/{logging.cli.plugin.d.ts → cli/plugin.d.ts} +3 -3
- package/dist/cli/plugin.d.ts.map +1 -0
- package/dist/cli/plugin.js +45 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/cli/resolve-output.d.ts +25 -0
- package/dist/cli/resolve-output.d.ts.map +1 -0
- package/dist/cli/resolve-output.js +75 -0
- package/dist/cli/resolve-output.js.map +1 -0
- package/dist/cli/types.d.ts +13 -5
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/cli/types.js +3 -3
- package/dist/client/logging-client.d.ts +31 -0
- package/dist/client/logging-client.d.ts.map +1 -0
- package/dist/client/logging-client.js +44 -0
- package/dist/client/logging-client.js.map +1 -0
- package/dist/config/file-rotation.d.ts +11 -0
- package/dist/config/file-rotation.d.ts.map +1 -0
- package/dist/config/file-rotation.js +18 -0
- package/dist/config/file-rotation.js.map +1 -0
- package/dist/config/load-config.d.ts +7 -0
- package/dist/config/load-config.d.ts.map +1 -0
- package/dist/config/load-config.js +68 -0
- package/dist/config/load-config.js.map +1 -0
- package/dist/config/logging.config.descriptor.d.ts +350 -0
- package/dist/config/logging.config.descriptor.d.ts.map +1 -0
- package/dist/config/logging.config.descriptor.js +208 -0
- package/dist/config/logging.config.descriptor.js.map +1 -0
- package/dist/config/otel-service.d.ts +9 -0
- package/dist/config/otel-service.d.ts.map +1 -0
- package/dist/config/otel-service.js +18 -0
- package/dist/config/otel-service.js.map +1 -0
- package/dist/contexts/bootstrap.plugin.d.ts +3 -0
- package/dist/contexts/bootstrap.plugin.d.ts.map +1 -0
- package/dist/contexts/bootstrap.plugin.js +13 -0
- package/dist/contexts/bootstrap.plugin.js.map +1 -0
- package/dist/contexts/fallback-logger.d.ts +7 -2
- package/dist/contexts/fallback-logger.d.ts.map +1 -1
- package/dist/contexts/fallback-logger.js +73 -46
- package/dist/contexts/fallback-logger.js.map +1 -1
- package/dist/contexts/index.d.ts +2 -2
- package/dist/contexts/index.d.ts.map +1 -1
- package/dist/contexts/index.js +2 -3
- package/dist/contexts/index.js.map +1 -1
- package/dist/contexts/logger.d.ts +38 -14
- package/dist/contexts/logger.d.ts.map +1 -1
- package/dist/contexts/logger.js +241 -62
- package/dist/contexts/logger.js.map +1 -1
- package/dist/core/attempt.d.ts +30 -0
- package/dist/core/attempt.d.ts.map +1 -0
- package/dist/core/attempt.js +44 -0
- package/dist/core/attempt.js.map +1 -0
- package/dist/core/emission-window.d.ts +34 -0
- package/dist/core/emission-window.d.ts.map +1 -0
- package/dist/core/emission-window.js +25 -0
- package/dist/core/emission-window.js.map +1 -0
- package/dist/core/endpoint.d.ts +54 -0
- package/dist/core/endpoint.d.ts.map +1 -0
- package/dist/core/endpoint.js +256 -0
- package/dist/core/endpoint.js.map +1 -0
- package/dist/core/entry-context.d.ts +106 -0
- package/dist/core/entry-context.d.ts.map +1 -0
- package/dist/core/entry-context.js +150 -0
- package/dist/core/entry-context.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +5 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/logger.d.ts +6 -1
- package/dist/core/logger.d.ts.map +1 -1
- package/dist/core/logger.js +133 -67
- package/dist/core/logger.js.map +1 -1
- package/dist/core/namespace.d.ts +5 -2
- package/dist/core/namespace.d.ts.map +1 -1
- package/dist/core/namespace.js +15 -7
- package/dist/core/namespace.js.map +1 -1
- package/dist/core/normalize.d.ts +31 -0
- package/dist/core/normalize.d.ts.map +1 -0
- package/dist/core/normalize.js +67 -0
- package/dist/core/normalize.js.map +1 -0
- package/dist/core/otlp-headers.d.ts +53 -0
- package/dist/core/otlp-headers.d.ts.map +1 -0
- package/dist/core/otlp-headers.js +64 -0
- package/dist/core/otlp-headers.js.map +1 -0
- package/dist/core/otlp-partial-success.d.ts +48 -0
- package/dist/core/otlp-partial-success.d.ts.map +1 -0
- package/dist/core/otlp-partial-success.js +55 -0
- package/dist/core/otlp-partial-success.js.map +1 -0
- package/dist/core/outcome.d.ts +21 -0
- package/dist/core/outcome.d.ts.map +1 -0
- package/dist/core/outcome.js +24 -0
- package/dist/core/outcome.js.map +1 -0
- package/dist/core/output-resources.d.ts +15 -0
- package/dist/core/output-resources.d.ts.map +1 -0
- package/dist/core/output-resources.js +51 -0
- package/dist/core/output-resources.js.map +1 -0
- package/dist/core/parsing.d.ts.map +1 -1
- package/dist/core/parsing.js +13 -10
- package/dist/core/parsing.js.map +1 -1
- package/dist/core/redact.d.ts +161 -0
- package/dist/core/redact.d.ts.map +1 -0
- package/dist/core/redact.js +581 -0
- package/dist/core/redact.js.map +1 -0
- package/dist/core/root-identity.d.ts +13 -0
- package/dist/core/root-identity.d.ts.map +1 -0
- package/dist/core/root-identity.js +23 -0
- package/dist/core/root-identity.js.map +1 -0
- package/dist/core/types.d.ts +5 -4
- package/dist/core/types.d.ts.map +1 -1
- package/dist/docs/cli.docs.descriptor.d.ts +4 -0
- package/dist/docs/cli.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/cli.docs.descriptor.js +97 -0
- package/dist/docs/cli.docs.descriptor.js.map +1 -0
- package/dist/docs/index.d.ts +7 -0
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +7 -0
- package/dist/docs/index.js.map +1 -0
- package/dist/docs/levels.docs.descriptor.d.ts +1 -1
- package/dist/docs/levels.docs.descriptor.d.ts.map +1 -1
- package/dist/docs/levels.docs.descriptor.js +112 -246
- package/dist/docs/levels.docs.descriptor.js.map +1 -1
- package/dist/docs/logging.docs.descriptor.d.ts +4 -0
- package/dist/docs/logging.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/logging.docs.descriptor.js +105 -0
- package/dist/docs/logging.docs.descriptor.js.map +1 -0
- package/dist/docs/observability.docs.descriptor.d.ts +4 -0
- package/dist/docs/observability.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/observability.docs.descriptor.js +152 -0
- package/dist/docs/observability.docs.descriptor.js.map +1 -0
- package/dist/docs/structured.docs.descriptor.d.ts +1 -1
- package/dist/docs/structured.docs.descriptor.d.ts.map +1 -1
- package/dist/docs/structured.docs.descriptor.js +111 -267
- package/dist/docs/structured.docs.descriptor.js.map +1 -1
- package/dist/docs/transports.docs.descriptor.d.ts +1 -1
- package/dist/docs/transports.docs.descriptor.d.ts.map +1 -1
- package/dist/docs/transports.docs.descriptor.js +129 -344
- package/dist/docs/transports.docs.descriptor.js.map +1 -1
- package/dist/formatters/json/json.impl.d.ts +1 -1
- package/dist/formatters/json/json.impl.d.ts.map +1 -1
- package/dist/formatters/json/json.impl.js +3 -2
- package/dist/formatters/json/json.impl.js.map +1 -1
- package/dist/formatters/json5/json5.impl.d.ts +1 -1
- package/dist/formatters/json5/json5.impl.d.ts.map +1 -1
- package/dist/formatters/json5/json5.impl.js +3 -2
- package/dist/formatters/json5/json5.impl.js.map +1 -1
- package/dist/formatters/jsonl/jsonl.impl.d.ts +1 -1
- package/dist/formatters/jsonl/jsonl.impl.d.ts.map +1 -1
- package/dist/formatters/jsonl/jsonl.impl.js +3 -2
- package/dist/formatters/jsonl/jsonl.impl.js.map +1 -1
- package/dist/formatters/pretty/{pretty.impl.cli.d.ts → pretty.impl.consumer.d.ts} +1 -1
- package/dist/formatters/pretty/pretty.impl.consumer.d.ts.map +1 -0
- package/dist/formatters/pretty/{pretty.impl.cli.js → pretty.impl.consumer.js} +1 -1
- package/dist/formatters/pretty/pretty.impl.consumer.js.map +1 -0
- package/dist/host-files/file-audit.base.d.ts +39 -0
- package/dist/host-files/file-audit.base.d.ts.map +1 -0
- package/dist/host-files/file-audit.base.js +255 -0
- package/dist/host-files/file-audit.base.js.map +1 -0
- package/dist/host-files/file-output.base.d.ts +84 -0
- package/dist/host-files/file-output.base.d.ts.map +1 -0
- package/dist/host-files/file-output.base.js +401 -0
- package/dist/host-files/file-output.base.js.map +1 -0
- package/dist/host-files/file-output.factory.base.d.ts +31 -0
- package/dist/host-files/file-output.factory.base.d.ts.map +1 -0
- package/dist/host-files/file-output.factory.base.js +82 -0
- package/dist/host-files/file-output.factory.base.js.map +1 -0
- package/dist/host-files/file-output.read.base.d.ts +7 -0
- package/dist/host-files/file-output.read.base.d.ts.map +1 -0
- package/dist/host-files/file-output.read.base.js +229 -0
- package/dist/host-files/file-output.read.base.js.map +1 -0
- package/dist/host-files/file-sink.base.d.ts +22 -0
- package/dist/host-files/file-sink.base.d.ts.map +1 -0
- package/dist/host-files/file-sink.base.js +56 -0
- package/dist/host-files/file-sink.base.js.map +1 -0
- package/dist/host-files/host-file-logging.plugin.d.ts +11 -0
- package/dist/host-files/host-file-logging.plugin.d.ts.map +1 -0
- package/dist/host-files/host-file-logging.plugin.js +63 -0
- package/dist/host-files/host-file-logging.plugin.js.map +1 -0
- package/dist/host-files/index.d.ts +19 -0
- package/dist/host-files/index.d.ts.map +1 -0
- package/dist/host-files/index.js +18 -0
- package/dist/host-files/index.js.map +1 -0
- package/dist/host-files/rotate-appended-file.base.d.ts +35 -0
- package/dist/host-files/rotate-appended-file.base.d.ts.map +1 -0
- package/dist/host-files/rotate-appended-file.base.js +104 -0
- package/dist/host-files/rotate-appended-file.base.js.map +1 -0
- package/dist/host.d.ts +38 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +39 -0
- package/dist/host.js.map +1 -0
- package/dist/index.d.ts +24 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -23
- package/dist/index.js.map +1 -1
- package/dist/kinds/audit.d.ts +40 -8
- package/dist/kinds/audit.d.ts.map +1 -1
- package/dist/kinds/audit.js +82 -20
- package/dist/kinds/audit.js.map +1 -1
- package/dist/kinds/contexts.d.ts +4 -3
- package/dist/kinds/contexts.d.ts.map +1 -1
- package/dist/kinds/file-output.d.ts +56 -0
- package/dist/kinds/file-output.d.ts.map +1 -0
- package/dist/kinds/file-output.js +11 -0
- package/dist/kinds/file-output.js.map +1 -0
- package/dist/kinds/formatter.d.ts +4 -6
- package/dist/kinds/formatter.d.ts.map +1 -1
- package/dist/kinds/formatter.js +4 -3
- package/dist/kinds/formatter.js.map +1 -1
- package/dist/kinds/index.d.ts +3 -3
- package/dist/kinds/index.d.ts.map +1 -1
- package/dist/kinds/index.js +3 -3
- package/dist/kinds/index.js.map +1 -1
- package/dist/kinds/logger.d.ts +4 -4
- package/dist/kinds/logger.d.ts.map +1 -1
- package/dist/kinds/logger.impl.d.ts +40 -13
- package/dist/kinds/logger.impl.d.ts.map +1 -1
- package/dist/kinds/logger.impl.js +179 -87
- package/dist/kinds/logger.impl.js.map +1 -1
- package/dist/kinds/logger.js +21 -11
- package/dist/kinds/logger.js.map +1 -1
- package/dist/kinds/logger.utils.d.ts +31 -4
- package/dist/kinds/logger.utils.d.ts.map +1 -1
- package/dist/kinds/logger.utils.js +58 -18
- package/dist/kinds/logger.utils.js.map +1 -1
- package/dist/kinds/output.d.ts +5 -11
- package/dist/kinds/output.d.ts.map +1 -1
- package/dist/kinds/output.impl.d.ts +9 -7
- package/dist/kinds/output.impl.d.ts.map +1 -1
- package/dist/kinds/output.impl.js +51 -29
- package/dist/kinds/output.impl.js.map +1 -1
- package/dist/kinds/output.js +10 -5
- package/dist/kinds/output.js.map +1 -1
- package/dist/kinds/output.types.d.ts +26 -7
- package/dist/kinds/output.types.d.ts.map +1 -1
- package/dist/kinds/sink.d.ts +6 -5
- package/dist/kinds/sink.d.ts.map +1 -1
- package/dist/kinds/sink.js +14 -7
- package/dist/kinds/sink.js.map +1 -1
- package/dist/logger.context.descriptor.d.ts +15 -1
- package/dist/logger.context.descriptor.d.ts.map +1 -1
- package/dist/logger.context.descriptor.js +1 -1
- package/dist/logger.context.descriptor.js.map +1 -1
- package/dist/logging.consumer.plugin.d.ts +4 -0
- package/dist/logging.consumer.plugin.d.ts.map +1 -0
- package/dist/logging.consumer.plugin.js +17 -0
- package/dist/logging.consumer.plugin.js.map +1 -0
- package/dist/logging.plugin.d.ts +3 -3
- package/dist/logging.plugin.d.ts.map +1 -1
- package/dist/logging.plugin.js +81 -42
- package/dist/logging.plugin.js.map +1 -1
- package/dist/observability/building-host.d.ts +11 -0
- package/dist/observability/building-host.d.ts.map +1 -0
- package/dist/observability/building-host.js +11 -0
- package/dist/observability/building-host.js.map +1 -0
- package/dist/observability/config.d.ts +36 -0
- package/dist/observability/config.d.ts.map +1 -0
- package/dist/observability/config.js +46 -0
- package/dist/observability/config.js.map +1 -0
- package/dist/observability/http/instrumented-fetch.d.ts +19 -0
- package/dist/observability/http/instrumented-fetch.d.ts.map +1 -0
- package/dist/observability/http/instrumented-fetch.js +175 -0
- package/dist/observability/http/instrumented-fetch.js.map +1 -0
- package/dist/observability/index.d.ts +8 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +10 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/lifecycle.d.ts +18 -0
- package/dist/observability/lifecycle.d.ts.map +1 -0
- package/dist/observability/lifecycle.js +44 -0
- package/dist/observability/lifecycle.js.map +1 -0
- package/dist/observability/observability/error-tracker.d.ts +43 -0
- package/dist/observability/observability/error-tracker.d.ts.map +1 -0
- package/dist/observability/observability/error-tracker.js +130 -0
- package/dist/observability/observability/error-tracker.js.map +1 -0
- package/dist/observability/should-keep-log.d.ts +8 -0
- package/dist/observability/should-keep-log.d.ts.map +1 -0
- package/dist/observability/should-keep-log.js +10 -0
- package/dist/observability/should-keep-log.js.map +1 -0
- package/dist/observability/telemetry/otel.d.ts +47 -0
- package/dist/observability/telemetry/otel.d.ts.map +1 -0
- package/dist/observability/telemetry/otel.js +542 -0
- package/dist/observability/telemetry/otel.js.map +1 -0
- package/dist/observability/telemetry/partial-success.d.ts +35 -0
- package/dist/observability/telemetry/partial-success.d.ts.map +1 -0
- package/dist/observability/telemetry/partial-success.js +94 -0
- package/dist/observability/telemetry/partial-success.js.map +1 -0
- package/dist/observability/telemetry/sdk-lifecycle.d.ts +37 -0
- package/dist/observability/telemetry/sdk-lifecycle.d.ts.map +1 -0
- package/dist/observability/telemetry/sdk-lifecycle.js +132 -0
- package/dist/observability/telemetry/sdk-lifecycle.js.map +1 -0
- package/dist/observability/telemetry/telemetry-root.d.ts +78 -0
- package/dist/observability/telemetry/telemetry-root.d.ts.map +1 -0
- package/dist/observability/telemetry/telemetry-root.js +79 -0
- package/dist/observability/telemetry/telemetry-root.js.map +1 -0
- package/dist/observability/telemetry-instrumentation.d.ts +76 -0
- package/dist/observability/telemetry-instrumentation.d.ts.map +1 -0
- package/dist/observability/telemetry-instrumentation.js +69 -0
- package/dist/observability/telemetry-instrumentation.js.map +1 -0
- package/dist/otel/index.d.ts +9 -0
- package/dist/otel/index.d.ts.map +1 -0
- package/dist/otel/index.js +12 -0
- package/dist/otel/index.js.map +1 -0
- package/dist/otel/logging-otel.plugin.d.ts +11 -0
- package/dist/otel/logging-otel.plugin.d.ts.map +1 -0
- package/dist/otel/logging-otel.plugin.js +27 -0
- package/dist/otel/logging-otel.plugin.js.map +1 -0
- package/dist/otel/sinks/otel/otel.descriptor.d.ts +10 -0
- package/dist/otel/sinks/otel/otel.descriptor.d.ts.map +1 -0
- package/dist/otel/sinks/otel/otel.descriptor.js +23 -0
- package/dist/otel/sinks/otel/otel.descriptor.js.map +1 -0
- package/dist/otel/sinks/otel/otel.impl.d.ts +47 -0
- package/dist/otel/sinks/otel/otel.impl.d.ts.map +1 -0
- package/dist/otel/sinks/otel/otel.impl.js +202 -0
- package/dist/otel/sinks/otel/otel.impl.js.map +1 -0
- package/dist/otel/sinks/otel/otlp-log-exporter.d.ts +76 -0
- package/dist/otel/sinks/otel/otlp-log-exporter.d.ts.map +1 -0
- package/dist/otel/sinks/otel/otlp-log-exporter.js +178 -0
- package/dist/otel/sinks/otel/otlp-log-exporter.js.map +1 -0
- package/dist/outputs/file/file.outputs.descriptor.d.ts +10 -0
- package/dist/outputs/file/file.outputs.descriptor.d.ts.map +1 -0
- package/dist/outputs/file/file.outputs.descriptor.js +32 -0
- package/dist/outputs/file/file.outputs.descriptor.js.map +1 -0
- package/dist/outputs/remote/remote.descriptor.d.ts +1 -1
- package/dist/outputs/remote/remote.descriptor.d.ts.map +1 -1
- package/dist/outputs/remote/remote.descriptor.js +1 -2
- package/dist/outputs/remote/remote.descriptor.js.map +1 -1
- package/dist/outputs/remote/remote.factory.d.ts +9 -0
- package/dist/outputs/remote/remote.factory.d.ts.map +1 -0
- package/dist/outputs/remote/remote.factory.js +16 -0
- package/dist/outputs/remote/remote.factory.js.map +1 -0
- package/dist/outputs/remote/remote.impl.d.ts +40 -4
- package/dist/outputs/remote/remote.impl.d.ts.map +1 -1
- package/dist/outputs/remote/remote.impl.js +224 -99
- package/dist/outputs/remote/remote.impl.js.map +1 -1
- package/dist/outputs.context.descriptor.d.ts +15 -1
- package/dist/outputs.context.descriptor.d.ts.map +1 -1
- package/dist/outputs.context.descriptor.js +1 -1
- package/dist/outputs.context.descriptor.js.map +1 -1
- package/dist/outputs.context.impl.d.ts +2 -1
- package/dist/outputs.context.impl.d.ts.map +1 -1
- package/dist/outputs.context.impl.js +17 -9
- package/dist/outputs.context.impl.js.map +1 -1
- package/dist/paths.d.ts +24 -3
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +63 -3
- package/dist/paths.js.map +1 -1
- package/dist/rotation/rotate-appended-file.d.ts +15 -0
- package/dist/rotation/rotate-appended-file.d.ts.map +1 -0
- package/dist/rotation/rotate-appended-file.js +20 -0
- package/dist/rotation/rotate-appended-file.js.map +1 -0
- package/dist/rotation/rotation-policy.d.ts +19 -0
- package/dist/rotation/rotation-policy.d.ts.map +1 -0
- package/dist/rotation/rotation-policy.js +37 -0
- package/dist/rotation/rotation-policy.js.map +1 -0
- package/dist/schemas/audit.d.ts +25 -7
- package/dist/schemas/audit.d.ts.map +1 -1
- package/dist/schemas/audit.js +10 -4
- package/dist/schemas/audit.js.map +1 -1
- package/dist/schemas/entry.d.ts +11 -5
- package/dist/schemas/entry.d.ts.map +1 -1
- package/dist/schemas/entry.js +3 -2
- package/dist/schemas/entry.js.map +1 -1
- package/dist/schemas/file-host.d.ts +86 -0
- package/dist/schemas/file-host.d.ts.map +1 -0
- package/dist/schemas/file-host.js +10 -0
- package/dist/schemas/file-host.js.map +1 -0
- package/dist/schemas/formatter.d.ts +11 -1
- package/dist/schemas/formatter.d.ts.map +1 -1
- package/dist/schemas/formatter.js +1 -1
- package/dist/schemas/formatter.js.map +1 -1
- package/dist/schemas/index.d.ts +3 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +3 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/logger.d.ts +16 -1
- package/dist/schemas/logger.d.ts.map +1 -1
- package/dist/schemas/logger.js +6 -1
- package/dist/schemas/logger.js.map +1 -1
- package/dist/schemas/output-defaults.d.ts +44 -0
- package/dist/schemas/output-defaults.d.ts.map +1 -0
- package/dist/schemas/output-defaults.js +53 -0
- package/dist/schemas/output-defaults.js.map +1 -0
- package/dist/schemas/output.d.ts +25 -1
- package/dist/schemas/output.d.ts.map +1 -1
- package/dist/schemas/output.js +29 -2
- package/dist/schemas/output.js.map +1 -1
- package/dist/schemas/sink.d.ts +32 -1
- package/dist/schemas/sink.d.ts.map +1 -1
- package/dist/schemas/sink.js +17 -1
- package/dist/schemas/sink.js.map +1 -1
- package/dist/sinks/buffer/buffer.descriptor.js +1 -1
- package/dist/sinks/buffer/buffer.descriptor.js.map +1 -1
- package/dist/sinks/buffer/{buffer.impl.cli.d.ts → buffer.impl.d.ts} +3 -3
- package/dist/sinks/buffer/buffer.impl.d.ts.map +1 -0
- package/dist/sinks/buffer/buffer.impl.js +42 -0
- package/dist/sinks/buffer/buffer.impl.js.map +1 -0
- package/dist/sinks/console/console.descriptor.js +1 -1
- package/dist/sinks/console/console.descriptor.js.map +1 -1
- package/dist/sinks/console/console.impl.browser.d.ts +4 -3
- package/dist/sinks/console/console.impl.browser.d.ts.map +1 -1
- package/dist/sinks/console/console.impl.browser.js +11 -14
- package/dist/sinks/console/console.impl.browser.js.map +1 -1
- package/dist/sinks/console/{console.impl.cli.d.ts → console.impl.consumer.d.ts} +5 -4
- package/dist/sinks/console/console.impl.consumer.d.ts.map +1 -0
- package/dist/sinks/console/{console.impl.cli.js → console.impl.consumer.js} +16 -8
- package/dist/sinks/console/console.impl.consumer.js.map +1 -0
- package/dist/sinks/file/file.sinks.descriptor.d.ts +10 -0
- package/dist/sinks/file/file.sinks.descriptor.d.ts.map +1 -0
- package/dist/sinks/file/file.sinks.descriptor.js +23 -0
- package/dist/sinks/file/file.sinks.descriptor.js.map +1 -0
- package/dist/sinks/index.d.ts +1 -1
- package/dist/sinks/index.d.ts.map +1 -1
- package/dist/sinks/memory/memory.descriptor.d.ts +1 -1
- package/dist/sinks/memory/memory.descriptor.js +2 -2
- package/dist/sinks/memory/memory.descriptor.js.map +1 -1
- package/dist/sinks/memory/memory.impl.d.ts +5 -11
- package/dist/sinks/memory/memory.impl.d.ts.map +1 -1
- package/dist/sinks/memory/memory.impl.js +46 -21
- package/dist/sinks/memory/memory.impl.js.map +1 -1
- package/dist/sinks/stdout/stdout.descriptor.js +1 -1
- package/dist/sinks/stdout/stdout.descriptor.js.map +1 -1
- package/dist/sinks/stdout/{stdout.impl.cli.d.ts → stdout.impl.d.ts} +5 -4
- package/dist/sinks/stdout/stdout.impl.d.ts.map +1 -0
- package/dist/sinks/stdout/stdout.impl.js +29 -0
- package/dist/sinks/stdout/stdout.impl.js.map +1 -0
- package/dist/sinks.context.descriptor.d.ts +15 -1
- package/dist/sinks.context.descriptor.d.ts.map +1 -1
- package/dist/sinks.context.descriptor.js +1 -1
- package/dist/sinks.context.descriptor.js.map +1 -1
- package/dist/sinks.context.impl.d.ts +2 -1
- package/dist/sinks.context.impl.d.ts.map +1 -1
- package/dist/sinks.context.impl.js +17 -9
- package/dist/sinks.context.impl.js.map +1 -1
- package/dist/stdout-capture/mcp-frame.d.ts +23 -0
- package/dist/stdout-capture/mcp-frame.d.ts.map +1 -0
- package/dist/stdout-capture/mcp-frame.js +80 -0
- package/dist/stdout-capture/mcp-frame.js.map +1 -0
- package/dist/stdout-capture/stdout-capture.descriptor.d.ts +10 -0
- package/dist/stdout-capture/stdout-capture.descriptor.d.ts.map +1 -0
- package/dist/stdout-capture/stdout-capture.descriptor.js +17 -0
- package/dist/stdout-capture/stdout-capture.descriptor.js.map +1 -0
- package/dist/stdout-capture/stdout-capture.impl.d.ts +19 -0
- package/dist/stdout-capture/stdout-capture.impl.d.ts.map +1 -0
- package/dist/stdout-capture/stdout-capture.impl.js +49 -0
- package/dist/stdout-capture/stdout-capture.impl.js.map +1 -0
- package/dist/stdout-capture/stdout-capture.lease.d.ts +45 -0
- package/dist/stdout-capture/stdout-capture.lease.d.ts.map +1 -0
- package/dist/stdout-capture/stdout-capture.lease.js +338 -0
- package/dist/stdout-capture/stdout-capture.lease.js.map +1 -0
- package/dist/stdout-capture/stdout-capture.output.descriptor.d.ts +4 -0
- package/dist/stdout-capture/stdout-capture.output.descriptor.d.ts.map +1 -0
- package/dist/stdout-capture/stdout-capture.output.descriptor.js +18 -0
- package/dist/stdout-capture/stdout-capture.output.descriptor.js.map +1 -0
- package/dist/stdout-capture/stdout-capture.state.d.ts +29 -0
- package/dist/stdout-capture/stdout-capture.state.d.ts.map +1 -0
- package/dist/stdout-capture/stdout-capture.state.js +80 -0
- package/dist/stdout-capture/stdout-capture.state.js.map +1 -0
- package/dist/stdout-capture.d.ts +24 -0
- package/dist/stdout-capture.d.ts.map +1 -0
- package/dist/stdout-capture.js +28 -0
- package/dist/stdout-capture.js.map +1 -0
- package/dist/stdout-capture.plugin.d.ts +7 -0
- package/dist/stdout-capture.plugin.d.ts.map +1 -0
- package/dist/stdout-capture.plugin.js +28 -0
- package/dist/stdout-capture.plugin.js.map +1 -0
- package/package.json +308 -224
- package/dist/contexts/audit.d.ts +0 -34
- package/dist/contexts/audit.d.ts.map +0 -1
- package/dist/contexts/audit.js +0 -13
- package/dist/contexts/audit.js.map +0 -1
- package/dist/formatters/index.d.ts +0 -7
- package/dist/formatters/index.d.ts.map +0 -1
- package/dist/formatters/index.js +0 -8
- package/dist/formatters/index.js.map +0 -1
- package/dist/formatters/pretty/pretty.impl.cli.d.ts.map +0 -1
- package/dist/formatters/pretty/pretty.impl.cli.js.map +0 -1
- package/dist/kinds/logger.contracts.d.ts +0 -16
- package/dist/kinds/logger.contracts.d.ts.map +0 -1
- package/dist/kinds/logger.contracts.js +0 -9
- package/dist/kinds/logger.contracts.js.map +0 -1
- package/dist/kinds/output.contracts.d.ts +0 -50
- package/dist/kinds/output.contracts.d.ts.map +0 -1
- package/dist/kinds/output.contracts.js +0 -10
- package/dist/kinds/output.contracts.js.map +0 -1
- package/dist/logging.cli.plugin.d.ts.map +0 -1
- package/dist/logging.cli.plugin.js +0 -39
- package/dist/logging.cli.plugin.js.map +0 -1
- package/dist/outputs/index.d.ts +0 -7
- package/dist/outputs/index.d.ts.map +0 -1
- package/dist/outputs/index.js +0 -8
- package/dist/outputs/index.js.map +0 -1
- package/dist/sinks/buffer/buffer.impl.cli.d.ts.map +0 -1
- package/dist/sinks/buffer/buffer.impl.cli.js +0 -34
- package/dist/sinks/buffer/buffer.impl.cli.js.map +0 -1
- package/dist/sinks/console/console.impl.cli.d.ts.map +0 -1
- package/dist/sinks/console/console.impl.cli.js.map +0 -1
- package/dist/sinks/stdout/stdout.impl.cli.d.ts.map +0 -1
- package/dist/sinks/stdout/stdout.impl.cli.js +0 -21
- package/dist/sinks/stdout/stdout.impl.cli.js.map +0 -1
- package/src/audit/audit.descriptor.ts +0 -45
- package/src/audit/audit.storage.schema.ts +0 -57
- package/src/audit/index.ts +0 -8
- package/src/cli/logs.descriptor.ts +0 -19
- package/src/cli/logs.list.descriptor.ts +0 -28
- package/src/cli/logs.list.impl.ts +0 -93
- package/src/cli/logs.rotate.descriptor.ts +0 -40
- package/src/cli/logs.rotate.impl.ts +0 -61
- package/src/cli/logs.search.descriptor.ts +0 -61
- package/src/cli/logs.search.impl.ts +0 -173
- package/src/cli/logs.tail.descriptor.ts +0 -49
- package/src/cli/logs.tail.impl.ts +0 -105
- package/src/cli/logs.view.descriptor.ts +0 -57
- package/src/cli/logs.view.impl.ts +0 -108
- package/src/cli/types.ts +0 -59
- package/src/contexts/audit.ts +0 -36
- package/src/contexts/fallback-logger.ts +0 -80
- package/src/contexts/index.ts +0 -23
- package/src/contexts/logger.ts +0 -119
- package/src/core/index.ts +0 -32
- package/src/core/logger.ts +0 -150
- package/src/core/namespace.ts +0 -195
- package/src/core/parsing.ts +0 -21
- package/src/core/types.ts +0 -82
- package/src/docs/levels.docs.descriptor.ts +0 -344
- package/src/docs/structured.docs.descriptor.ts +0 -444
- package/src/docs/transports.docs.descriptor.ts +0 -428
- package/src/formatters/index.ts +0 -6
- package/src/formatters/json/json.formatters.descriptor.ts +0 -25
- package/src/formatters/json/json.impl.ts +0 -41
- package/src/formatters/json5/json5.descriptor.ts +0 -25
- package/src/formatters/json5/json5.impl.ts +0 -43
- package/src/formatters/jsonl/jsonl.descriptor.ts +0 -26
- package/src/formatters/jsonl/jsonl.impl.ts +0 -39
- package/src/formatters/pretty/pretty.descriptor.ts +0 -26
- package/src/formatters/pretty/pretty.impl.cli.ts +0 -101
- package/src/index.ts +0 -190
- package/src/kinds/audit.ts +0 -169
- package/src/kinds/contexts.ts +0 -22
- package/src/kinds/formatter.ts +0 -117
- package/src/kinds/index.ts +0 -25
- package/src/kinds/logger.contracts.ts +0 -17
- package/src/kinds/logger.impl.ts +0 -206
- package/src/kinds/logger.ts +0 -46
- package/src/kinds/logger.utils.ts +0 -91
- package/src/kinds/output.contracts.ts +0 -54
- package/src/kinds/output.impl.ts +0 -118
- package/src/kinds/output.ts +0 -59
- package/src/kinds/output.types.ts +0 -105
- package/src/kinds/sink.ts +0 -100
- package/src/logger.context.descriptor.ts +0 -13
- package/src/logging.cli.plugin.ts +0 -43
- package/src/logging.plugin.ts +0 -93
- package/src/outputs/index.ts +0 -6
- package/src/outputs/remote/remote.descriptor.ts +0 -27
- package/src/outputs/remote/remote.impl.ts +0 -218
- package/src/outputs.context.descriptor.ts +0 -10
- package/src/outputs.context.impl.ts +0 -30
- package/src/paths.ts +0 -10
- package/src/schemas/audit.ts +0 -98
- package/src/schemas/entry.ts +0 -88
- package/src/schemas/formatter.ts +0 -37
- package/src/schemas/index.ts +0 -80
- package/src/schemas/logger.ts +0 -38
- package/src/schemas/output.ts +0 -62
- package/src/schemas/sink.ts +0 -39
- package/src/sinks/buffer/buffer.descriptor.ts +0 -13
- package/src/sinks/buffer/buffer.impl.cli.ts +0 -49
- package/src/sinks/console/console.descriptor.ts +0 -20
- package/src/sinks/console/console.impl.browser.ts +0 -69
- package/src/sinks/console/console.impl.cli.ts +0 -71
- package/src/sinks/index.ts +0 -8
- package/src/sinks/memory/memory.descriptor.ts +0 -20
- package/src/sinks/memory/memory.impl.ts +0 -119
- package/src/sinks/stdout/stdout.descriptor.ts +0 -13
- package/src/sinks/stdout/stdout.impl.cli.ts +0 -27
- package/src/sinks.context.descriptor.ts +0 -10
- package/src/sinks.context.impl.ts +0 -30
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logging OpenTelemetry Plugin
|
|
3
|
+
*
|
|
4
|
+
* Registers the OpenTelemetry log sink with the runtime.
|
|
5
|
+
* Server/cloud environments only. OTEL configuration (OTEL_SERVICE_NAME,
|
|
6
|
+
* OTEL_EXPORTER_OTLP_LOGS_ENDPOINT, OTEL_EXPORTER_OTLP_ENDPOINT) is read through
|
|
7
|
+
* the runtime env gateway.
|
|
8
|
+
*/
|
|
9
|
+
export declare const loggingOtelPlugin: import("@vibesdotdev/kernel").RuntimePlugin;
|
|
10
|
+
export default loggingOtelPlugin;
|
|
11
|
+
//# sourceMappingURL=logging-otel.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging-otel.plugin.d.ts","sourceRoot":"","sources":["../../src/otel/logging-otel.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,eAAO,MAAM,iBAAiB,6CAqB5B,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logging OpenTelemetry Plugin
|
|
3
|
+
*
|
|
4
|
+
* Registers the OpenTelemetry log sink with the runtime.
|
|
5
|
+
* Server/cloud environments only. OTEL configuration (OTEL_SERVICE_NAME,
|
|
6
|
+
* OTEL_EXPORTER_OTLP_LOGS_ENDPOINT, OTEL_EXPORTER_OTLP_ENDPOINT) is read through
|
|
7
|
+
* the runtime env gateway.
|
|
8
|
+
*/
|
|
9
|
+
import { createRuntimePlugin } from '@vibesdotdev/kernel';
|
|
10
|
+
// Descriptors
|
|
11
|
+
import otelSinkDescriptor from "./sinks/otel/otel.descriptor.js";
|
|
12
|
+
export const loggingOtelPlugin = createRuntimePlugin({
|
|
13
|
+
id: '@vibesdotdev/logging/otel',
|
|
14
|
+
name: 'Logging OpenTelemetry',
|
|
15
|
+
description: 'OpenTelemetry log sink that exports structured logs via OTLP to a compatible collector.',
|
|
16
|
+
dependencies: ['logging'],
|
|
17
|
+
descriptors: [otelSinkDescriptor],
|
|
18
|
+
onRegister: async (runtime) => {
|
|
19
|
+
// Register loader for OTEL sink implementation. The sink exports to a
|
|
20
|
+
// collector from cloud hosts only, matching the descriptor's hardware.
|
|
21
|
+
runtime.registerLoader('logging/sink', otelSinkDescriptor.id, async () => {
|
|
22
|
+
return { impl: (await import("./sinks/otel/otel.impl.js")).default };
|
|
23
|
+
}, { constraint: { hardware: ['cloud'] } });
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export default loggingOtelPlugin;
|
|
27
|
+
//# sourceMappingURL=logging-otel.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging-otel.plugin.js","sourceRoot":"","sources":["../../src/otel/logging-otel.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,cAAc;AACd,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AAEjE,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;IACpD,EAAE,EAAE,2BAA2B;IAC/B,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACV,yFAAyF;IAC1F,YAAY,EAAE,CAAC,SAAS,CAAC;IAEzB,WAAW,EAAE,CAAC,kBAAkB,CAAC;IAEjC,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QAC7B,sEAAsE;QACtE,uEAAuE;QACvE,OAAO,CAAC,cAAc,CACrB,cAAc,EACd,kBAAkB,CAAC,EAAE,EACrB,KAAK,IAAI,EAAE;YACV,OAAO,EAAE,IAAI,EAAE,CAAC,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QACtE,CAAC,EACD,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,CACvC,CAAC;IACH,CAAC;CACD,CAAC,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenTelemetry Sink Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Exports logs to OpenTelemetry collector.
|
|
5
|
+
* Server/cloud only.
|
|
6
|
+
*/
|
|
7
|
+
import type { SinkDescriptor } from '@vibesdotdev/logging/schemas/sink';
|
|
8
|
+
export declare const otelSinkDescriptor: SinkDescriptor;
|
|
9
|
+
export default otelSinkDescriptor;
|
|
10
|
+
//# sourceMappingURL=otel.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otel.descriptor.d.ts","sourceRoot":"","sources":["../../../../src/otel/sinks/otel/otel.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,eAAO,MAAM,kBAAkB,EAAE,cAchC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenTelemetry Sink Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Exports logs to OpenTelemetry collector.
|
|
5
|
+
* Server/cloud only.
|
|
6
|
+
*/
|
|
7
|
+
export const otelSinkDescriptor = {
|
|
8
|
+
kind: 'logging/sink',
|
|
9
|
+
id: 'otel',
|
|
10
|
+
name: 'OpenTelemetry Sink',
|
|
11
|
+
description: 'Exports logs to OpenTelemetry collector via OTLP',
|
|
12
|
+
tags: ['production', 'observability', 'cloud'],
|
|
13
|
+
hardware: ['cloud'],
|
|
14
|
+
async: true,
|
|
15
|
+
batching: {
|
|
16
|
+
enabled: true,
|
|
17
|
+
maxSize: 100,
|
|
18
|
+
maxWait: 5000
|
|
19
|
+
},
|
|
20
|
+
formats: ['jsonl']
|
|
21
|
+
};
|
|
22
|
+
export default otelSinkDescriptor;
|
|
23
|
+
//# sourceMappingURL=otel.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otel.descriptor.js","sourceRoot":"","sources":["../../../../src/otel/sinks/otel/otel.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAAmB;IACjD,IAAI,EAAE,cAAc;IACpB,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,kDAAkD;IAC/D,IAAI,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,OAAO,CAAC;IAC9C,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE;QACT,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,GAAG;QACZ,OAAO,EAAE,IAAI;KACb;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;CAClB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenTelemetry Sink Implementation (cloud hosts; the plugin constrains the loader)
|
|
3
|
+
*
|
|
4
|
+
* Direct OTLP SDK integration for log export.
|
|
5
|
+
* NOTE: @opentelemetry packages are hard dependencies, loaded lazily by
|
|
6
|
+
* dynamic import. This module throws if they're missing when the sink is
|
|
7
|
+
* instantiated.
|
|
8
|
+
*/
|
|
9
|
+
import { type RuntimeRef } from '@vibesdotdev/kernel';
|
|
10
|
+
import type { CredentialReference } from '@vibesdotdev/kernel/credentials';
|
|
11
|
+
import type { SinkImplementation, SinkContext } from '@vibesdotdev/logging/kinds/sink';
|
|
12
|
+
import { type SinkDescriptor } from '@vibesdotdev/logging/schemas/sink';
|
|
13
|
+
import type { RuntimeLogEntry } from '@vibesdotdev/logging/schemas/entry';
|
|
14
|
+
/**
|
|
15
|
+
* Sink configuration, read from the logging config manifest when the sink is
|
|
16
|
+
* constructed (after the host registered its runtime environment).
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveOtelSinkConfig(runtime: RuntimeRef): Promise<{
|
|
19
|
+
serviceName: string;
|
|
20
|
+
serviceVersion: string;
|
|
21
|
+
endpoint: string;
|
|
22
|
+
/** The declared credential reference, when the composition declares one. */
|
|
23
|
+
headersCredential: CredentialReference | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* OpenTelemetry sink - exports logs via OTLP.
|
|
27
|
+
*/
|
|
28
|
+
export default class OtelSink implements SinkImplementation {
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly descriptor: SinkDescriptor;
|
|
31
|
+
private readonly runtime;
|
|
32
|
+
private closing;
|
|
33
|
+
private closePromise;
|
|
34
|
+
private readonly ready;
|
|
35
|
+
constructor(descriptor: SinkDescriptor, context: SinkContext);
|
|
36
|
+
private boot;
|
|
37
|
+
emit(entry: RuntimeLogEntry): void | Promise<void>;
|
|
38
|
+
flush(): Promise<void>;
|
|
39
|
+
close(): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Flatten context for OTEL attributes.
|
|
42
|
+
* OTEL attributes must be primitive values.
|
|
43
|
+
*/
|
|
44
|
+
private flattenContext;
|
|
45
|
+
private flattenEntries;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=otel.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otel.impl.d.ts","sourceRoot":"","sources":["../../../../src/otel/sinks/otel/otel.impl.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAS3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACvF,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC9F,OAAO,KAAK,EAAE,eAAe,EAAwB,MAAM,oCAAoC,CAAC;AAkEhG;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,iBAAiB,EAAE,mBAAmB,GAAG,SAAS,CAAC;CACnD,CAAC,CAWD;AAmBD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,YAAW,kBAAkB;IAC1D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAa;IACrC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAGnB;gBACS,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW;YAW9C,IAAI;IAyBlB,IAAI,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB5C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAUtB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,cAAc;CAqCtB"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenTelemetry Sink Implementation (cloud hosts; the plugin constrains the loader)
|
|
3
|
+
*
|
|
4
|
+
* Direct OTLP SDK integration for log export.
|
|
5
|
+
* NOTE: @opentelemetry packages are hard dependencies, loaded lazily by
|
|
6
|
+
* dynamic import. This module throws if they're missing when the sink is
|
|
7
|
+
* instantiated.
|
|
8
|
+
*/
|
|
9
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
10
|
+
import * as z from 'zod/v4';
|
|
11
|
+
import { settle } from "../../../core/outcome.js";
|
|
12
|
+
import { trackLoggingResource, untrackLoggingResource } from "../../../core/output-resources.js";
|
|
13
|
+
import { PlainLogRecordSchema } from "../../../core/redact.js";
|
|
14
|
+
import { loadLoggingConfig } from "../../../config/load-config.js";
|
|
15
|
+
import { resolveOtelServiceName } from "../../../config/otel-service.js";
|
|
16
|
+
import { resolveOtelHeaders } from "../../../core/otlp-headers.js";
|
|
17
|
+
import { createRuntimeOtlpLogExporter } from "./otlp-log-exporter.js";
|
|
18
|
+
import { SinkDescriptorSchema } from '@vibesdotdev/logging/schemas/sink';
|
|
19
|
+
/** The resolver failure code Node and Bun attach to an unresolvable specifier. */
|
|
20
|
+
const ModuleResolutionFailureSchema = z.object({ code: z.string() });
|
|
21
|
+
async function loadOtelModules() {
|
|
22
|
+
try {
|
|
23
|
+
const [logs, sdkLogs, resources, semanticConventions, exporterBase, transformer] = await Promise.all([
|
|
24
|
+
import('@opentelemetry/api-logs'),
|
|
25
|
+
import('@opentelemetry/sdk-logs'),
|
|
26
|
+
import('@opentelemetry/resources'),
|
|
27
|
+
import('@opentelemetry/semantic-conventions'),
|
|
28
|
+
import('@opentelemetry/otlp-exporter-base'),
|
|
29
|
+
import('@opentelemetry/otlp-transformer')
|
|
30
|
+
]);
|
|
31
|
+
return { modules: { logs, sdkLogs, resources, semanticConventions, exporterBase, transformer } };
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
const resolution = ModuleResolutionFailureSchema.safeParse(error);
|
|
35
|
+
const code = resolution.success ? resolution.data.code : undefined;
|
|
36
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
37
|
+
if (code === 'ERR_MODULE_NOT_FOUND' ||
|
|
38
|
+
code === 'MODULE_NOT_FOUND' ||
|
|
39
|
+
message.includes('Cannot find module') ||
|
|
40
|
+
message.includes('Cannot find package')) {
|
|
41
|
+
// Missing install: OpenTelemetry packages are hard dependencies, so
|
|
42
|
+
// absence is a broken install; the sink constructor throws with it.
|
|
43
|
+
return { modules: null, missing: error };
|
|
44
|
+
}
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const otelLoad = await loadOtelModules();
|
|
49
|
+
function requireOtelModules() {
|
|
50
|
+
if (!otelLoad.modules) {
|
|
51
|
+
throw new Error('OpenTelemetry dependencies not installed. Install: @opentelemetry/api-logs, @opentelemetry/sdk-logs, @opentelemetry/otlp-exporter-base, @opentelemetry/otlp-transformer, @opentelemetry/resources, @opentelemetry/semantic-conventions', { cause: otelLoad.missing });
|
|
52
|
+
}
|
|
53
|
+
return otelLoad.modules;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Sink configuration, read from the logging config manifest when the sink is
|
|
57
|
+
* constructed (after the host registered its runtime environment).
|
|
58
|
+
*/
|
|
59
|
+
export async function resolveOtelSinkConfig(runtime) {
|
|
60
|
+
const settings = await loadLoggingConfig(runtime);
|
|
61
|
+
const envVersion = runtime.getEnv('npm_package_version')?.trim();
|
|
62
|
+
const envLogsEndpoint = runtime.getEnv('OTEL_EXPORTER_OTLP_LOGS_ENDPOINT')?.trim();
|
|
63
|
+
const envEndpoint = runtime.getEnv('OTEL_EXPORTER_OTLP_ENDPOINT')?.trim();
|
|
64
|
+
return {
|
|
65
|
+
serviceName: resolveOtelServiceName(runtime, settings.otelServiceName),
|
|
66
|
+
serviceVersion: envVersion ? envVersion : settings.otelServiceVersion,
|
|
67
|
+
endpoint: envLogsEndpoint ? envLogsEndpoint : envEndpoint ? envEndpoint : settings.otelLogsEndpoint,
|
|
68
|
+
headersCredential: settings.otelHeadersCredential
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/** OTEL attribute scalars, including the non-finite numbers `z.number()` refuses. */
|
|
72
|
+
const AttributeScalarSchema = z.union([
|
|
73
|
+
z.string(),
|
|
74
|
+
z.boolean(),
|
|
75
|
+
z.number(),
|
|
76
|
+
z.nan(),
|
|
77
|
+
z.literal([Infinity, -Infinity])
|
|
78
|
+
]);
|
|
79
|
+
/** Map log levels to OTEL severity */
|
|
80
|
+
const SEVERITY_MAP = {
|
|
81
|
+
debug: 1, // SeverityNumber.DEBUG
|
|
82
|
+
info: 9, // SeverityNumber.INFO
|
|
83
|
+
warn: 13, // SeverityNumber.WARN
|
|
84
|
+
error: 17 // SeverityNumber.ERROR
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* OpenTelemetry sink - exports logs via OTLP.
|
|
88
|
+
*/
|
|
89
|
+
export default class OtelSink {
|
|
90
|
+
id;
|
|
91
|
+
descriptor;
|
|
92
|
+
runtime;
|
|
93
|
+
closing = false;
|
|
94
|
+
closePromise = null;
|
|
95
|
+
ready;
|
|
96
|
+
constructor(descriptor, context) {
|
|
97
|
+
const modules = requireOtelModules();
|
|
98
|
+
this.descriptor = SinkDescriptorSchema.parse(descriptor);
|
|
99
|
+
this.id = this.descriptor.id;
|
|
100
|
+
this.runtime = context.runtime;
|
|
101
|
+
this.ready = this.boot(modules, this.descriptor, this.runtime);
|
|
102
|
+
// A boot failure is retained for the first emit, flush or close to throw; observing it here keeps it from surfacing as an unhandled rejection.
|
|
103
|
+
void settle(this.ready);
|
|
104
|
+
trackLoggingResource(this.runtime, this);
|
|
105
|
+
}
|
|
106
|
+
async boot(modules, descriptor, runtime) {
|
|
107
|
+
const { sdkLogs, resources, semanticConventions } = modules;
|
|
108
|
+
const config = await resolveOtelSinkConfig(runtime);
|
|
109
|
+
const resource = resources.resourceFromAttributes({
|
|
110
|
+
[semanticConventions.ATTR_SERVICE_NAME]: config.serviceName,
|
|
111
|
+
[semanticConventions.ATTR_SERVICE_VERSION]: config.serviceVersion
|
|
112
|
+
});
|
|
113
|
+
// Headers are the declared credential's, resolved through the runtime; nothing ambient reaches the exporter.
|
|
114
|
+
const headers = config.headersCredential ? (await resolveOtelHeaders(runtime, config.headersCredential)).headers : undefined;
|
|
115
|
+
const exporter = createRuntimeOtlpLogExporter(modules, { runtime, url: config.endpoint, headers });
|
|
116
|
+
const batching = descriptor.batching;
|
|
117
|
+
const processor = batching?.enabled
|
|
118
|
+
? new sdkLogs.BatchLogRecordProcessor(exporter, {
|
|
119
|
+
maxQueueSize: batching.maxSize * 10,
|
|
120
|
+
maxExportBatchSize: batching.maxSize,
|
|
121
|
+
scheduledDelayMillis: batching.maxWait
|
|
122
|
+
})
|
|
123
|
+
: new sdkLogs.SimpleLogRecordProcessor(exporter);
|
|
124
|
+
const provider = new sdkLogs.LoggerProvider({ resource, processors: [processor] });
|
|
125
|
+
return { provider, logger: provider.getLogger('vibes') };
|
|
126
|
+
}
|
|
127
|
+
emit(entry) {
|
|
128
|
+
if (this.closing || this.runtime.lifecycle.signal.aborted) {
|
|
129
|
+
return Promise.reject(new CapabilityError('The OpenTelemetry sink no longer accepts entries.', 'UNAVAILABLE', {
|
|
130
|
+
reason: this.closing ? 'sink-closed' : 'sink-runtime-disposed', details: { id: this.id },
|
|
131
|
+
cause: this.runtime.lifecycle.signal.reason
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
return this.ready.then(({ logger }) => {
|
|
135
|
+
const { level, namespace, message, timestamp, context } = entry;
|
|
136
|
+
logger.emit({
|
|
137
|
+
severityNumber: SEVERITY_MAP[level],
|
|
138
|
+
severityText: level.toUpperCase(),
|
|
139
|
+
body: message,
|
|
140
|
+
timestamp: new Date(timestamp), // a Date is exact epoch time; the SDK reads a bare number below the process origin as an offset from it
|
|
141
|
+
attributes: {
|
|
142
|
+
'log.namespace': namespace,
|
|
143
|
+
...this.flattenContext(context)
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
async flush() {
|
|
149
|
+
const { provider } = await this.ready;
|
|
150
|
+
await provider.forceFlush();
|
|
151
|
+
}
|
|
152
|
+
close() {
|
|
153
|
+
if (this.closePromise)
|
|
154
|
+
return this.closePromise;
|
|
155
|
+
this.closing = true;
|
|
156
|
+
this.closePromise = this.ready.then(async ({ provider }) => {
|
|
157
|
+
await provider.shutdown();
|
|
158
|
+
untrackLoggingResource(this.runtime, this);
|
|
159
|
+
});
|
|
160
|
+
return this.closePromise;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Flatten context for OTEL attributes.
|
|
164
|
+
* OTEL attributes must be primitive values.
|
|
165
|
+
*/
|
|
166
|
+
flattenContext(context, prefix = '') {
|
|
167
|
+
return this.flattenEntries(Object.entries(context), prefix);
|
|
168
|
+
}
|
|
169
|
+
flattenEntries(entries, prefix) {
|
|
170
|
+
const result = {};
|
|
171
|
+
for (const [key, value] of entries) {
|
|
172
|
+
// Skip standard fields already handled
|
|
173
|
+
if (['timestamp', 'level', 'namespace'].includes(key))
|
|
174
|
+
continue;
|
|
175
|
+
const attrKey = prefix ? `${prefix}.${key}` : key;
|
|
176
|
+
if (value === null || value === undefined)
|
|
177
|
+
continue;
|
|
178
|
+
const scalar = AttributeScalarSchema.safeParse(value);
|
|
179
|
+
if (scalar.success) {
|
|
180
|
+
result[attrKey] = scalar.data;
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
if (Array.isArray(value)) {
|
|
184
|
+
result[attrKey] = JSON.stringify(value);
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
// Nested records flatten under their key, including null-prototype records.
|
|
188
|
+
const nested = PlainLogRecordSchema.safeParse(value);
|
|
189
|
+
if (nested.success) {
|
|
190
|
+
Object.assign(result, this.flattenEntries(Object.entries(nested.data), attrKey));
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
if (value instanceof Object && !(value instanceof Function)) {
|
|
194
|
+
Object.assign(result, this.flattenEntries(Object.entries(value), attrKey));
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
result[attrKey] = String(value);
|
|
198
|
+
}
|
|
199
|
+
return result;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=otel.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otel.impl.js","sourceRoot":"","sources":["../../../../src/otel/sinks/otel/otel.impl.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAmB,MAAM,qBAAqB,CAAC;AAEvE,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EA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convenience exporter merges ambient `OTEL_EXPORTER_OTLP_*` process
|
|
5
|
+
* variables (headers, certificates, endpoint) beneath whatever it is given, and
|
|
6
|
+
* no option turns that off. That merge lives only in its legacy-config
|
|
7
|
+
* converters, so this exporter composes the SDK's own lower-level pieces from
|
|
8
|
+
* explicit configuration: the JSON log serializer, the export delegate (bounded
|
|
9
|
+
* queue, flush, shutdown) and a transport of Logging's own. The transport
|
|
10
|
+
* sends exactly the headers the runtime's credential capability resolved, with
|
|
11
|
+
* the platform `fetch` under the runtime lifecycle's deadline. There is no
|
|
12
|
+
* retry: a collector failure is reported and the SDK's processor owns the batch.
|
|
13
|
+
* A success that rejected part of the batch (`partialSuccess`) is reported too,
|
|
14
|
+
* and every report removes the request's header values from what it carries.
|
|
15
|
+
*/
|
|
16
|
+
import { type RuntimeRef } from '@vibesdotdev/kernel';
|
|
17
|
+
import type { OTLPExporterBase, ExportResponse, IExporterTransport } from '@opentelemetry/otlp-exporter-base';
|
|
18
|
+
import type { ReadableLogRecord } from '@opentelemetry/sdk-logs';
|
|
19
|
+
import type { OtlpExporterHeaders } from '../../../core/otlp-headers.ts';
|
|
20
|
+
/** The default deadline for one export request. */
|
|
21
|
+
export declare const OTLP_EXPORT_TIMEOUT_MS = 10000;
|
|
22
|
+
/** The SDK packages this exporter composes, loaded lazily by the sink. */
|
|
23
|
+
export interface OtlpExporterModules {
|
|
24
|
+
readonly exporterBase: typeof import('@opentelemetry/otlp-exporter-base');
|
|
25
|
+
readonly transformer: typeof import('@opentelemetry/otlp-transformer');
|
|
26
|
+
}
|
|
27
|
+
export interface OtlpLogExporterOptions {
|
|
28
|
+
/** The runtime whose lifecycle bounds each request and which receives failure diagnostics. */
|
|
29
|
+
readonly runtime: RuntimeRef;
|
|
30
|
+
/** The collector's OTLP/HTTP logs URL. */
|
|
31
|
+
readonly url: string;
|
|
32
|
+
/** Explicit headers, resolved through `runtime.resolveCredential`; none when undeclared. */
|
|
33
|
+
readonly headers?: OtlpExporterHeaders;
|
|
34
|
+
}
|
|
35
|
+
/** Sends serialized OTLP requests with `fetch` and exactly the headers it was given. */
|
|
36
|
+
export declare class RuntimeOtlpTransport implements IExporterTransport {
|
|
37
|
+
private readonly runtime;
|
|
38
|
+
private readonly url;
|
|
39
|
+
private readonly headers;
|
|
40
|
+
/** The header values this transport sends: every report removes them from what it carries. */
|
|
41
|
+
private readonly secrets;
|
|
42
|
+
/**
|
|
43
|
+
* The failure the SDK is handed for a request that did not complete: typed, its
|
|
44
|
+
* description scrubbed of the endpoint credentials and of every header value
|
|
45
|
+
* (a transport can echo a header it refused, value included). The raw failure
|
|
46
|
+
* is never handed on: the SDK's global error handler would print it.
|
|
47
|
+
*/
|
|
48
|
+
private readonly requestFailure;
|
|
49
|
+
private closed;
|
|
50
|
+
constructor(options: OtlpLogExporterOptions);
|
|
51
|
+
send(data: Uint8Array, timeoutMillis: number): Promise<ExportResponse>;
|
|
52
|
+
shutdown(): void;
|
|
53
|
+
/**
|
|
54
|
+
* One request, its success body included, under one lifecycle deadline: a
|
|
55
|
+
* collector that answers its headers and then stalls the body fails at the
|
|
56
|
+
* deadline like one that never answers, and the request is aborted.
|
|
57
|
+
*/
|
|
58
|
+
private post;
|
|
59
|
+
private readSuccessBody;
|
|
60
|
+
/**
|
|
61
|
+
* A partial rejection is a collector failure and is reported once, by count
|
|
62
|
+
* (the collector's message scrubbed and bounded). A body that cannot be read
|
|
63
|
+
* as an OTLP/JSON export response cannot confirm the batch was accepted, so
|
|
64
|
+
* that is reported too, by why, never by its text.
|
|
65
|
+
*/
|
|
66
|
+
private reportSuccessBody;
|
|
67
|
+
/**
|
|
68
|
+
* The SDK's own callback is silent by default: the failure is reported through the runtime, endpoint credentials
|
|
69
|
+
* removed. A failed request's error is already {@link requestFailure}'s, scrubbed of the header values; a
|
|
70
|
+
* rejecting status and a closed transport carry none.
|
|
71
|
+
*/
|
|
72
|
+
private report;
|
|
73
|
+
}
|
|
74
|
+
/** The log exporter: the SDK's export delegate over this module's transport, reading no ambient environment. */
|
|
75
|
+
export declare function createRuntimeOtlpLogExporter(modules: OtlpExporterModules, options: OtlpLogExporterOptions): OTLPExporterBase<ReadableLogRecord[]>;
|
|
76
|
+
//# sourceMappingURL=otlp-log-exporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otlp-log-exporter.d.ts","sourceRoot":"","sources":["../../../../src/otel/sinks/otel/otlp-log-exporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC9G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAIjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAIzE,mDAAmD;AACnD,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAK7C,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,YAAY,EAAE,cAAc,mCAAmC,CAAC,CAAC;IAC1E,QAAQ,CAAC,WAAW,EAAE,cAAc,iCAAiC,CAAC,CAAC;CACvE;AAED,MAAM,WAAW,sBAAsB;IACtC,8FAA8F;IAC9F,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,0CAA0C;IAC1C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC;CACvC;AA4CD,wFAAwF;AACxF,qBAAa,oBAAqB,YAAW,kBAAkB;IAC9D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAa;IACrC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;IAC9C,8FAA8F;IAC9F,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAC5C;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA6B;IAC5D,OAAO,CAAC,MAAM,CAAS;gBAEX,OAAO,EAAE,sBAAsB;IAYrC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAQ5E,QAAQ,IAAI,IAAI;IAIhB;;;;OAIG;YACW,IAAI;IA8BlB,OAAO,CAAC,eAAe;IAWvB;;;;;OAKG;YACW,iBAAiB;IAa/B;;;;OAIG;YACW,MAAM;CAMpB;AAED,gHAAgH;AAChH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,sBAAsB,GAAG,gBAAgB,CAAC,iBAAiB,EAAE,CAAC,CAMjJ"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OTLP/HTTP log exporter with runtime-owned credentials.
|
|
3
|
+
*
|
|
4
|
+
* The SDK's convenience exporter merges ambient `OTEL_EXPORTER_OTLP_*` process
|
|
5
|
+
* variables (headers, certificates, endpoint) beneath whatever it is given, and
|
|
6
|
+
* no option turns that off. That merge lives only in its legacy-config
|
|
7
|
+
* converters, so this exporter composes the SDK's own lower-level pieces from
|
|
8
|
+
* explicit configuration: the JSON log serializer, the export delegate (bounded
|
|
9
|
+
* queue, flush, shutdown) and a transport of Logging's own. The transport
|
|
10
|
+
* sends exactly the headers the runtime's credential capability resolved, with
|
|
11
|
+
* the platform `fetch` under the runtime lifecycle's deadline. There is no
|
|
12
|
+
* retry: a collector failure is reported and the SDK's processor owns the batch.
|
|
13
|
+
* A success that rejected part of the batch (`partialSuccess`) is reported too,
|
|
14
|
+
* and every report removes the request's header values from what it carries.
|
|
15
|
+
*/
|
|
16
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
17
|
+
import * as z from 'zod/v4';
|
|
18
|
+
import { createFallbackLogger } from "../../../contexts/fallback-logger.js";
|
|
19
|
+
import { RedactedEndpointSchema, createEndpointFailureSchema } from "../../../core/endpoint.js";
|
|
20
|
+
import { attempt, settle } from "../../../core/outcome.js";
|
|
21
|
+
import { OTLP_RESPONSE_BODY_LIMIT_BYTES, OtlpExportResponseSchema, readOtlpPartialRejection } from "../../../core/otlp-partial-success.js";
|
|
22
|
+
/** The default deadline for one export request. */
|
|
23
|
+
export const OTLP_EXPORT_TIMEOUT_MS = 10_000;
|
|
24
|
+
/** The collector statuses OTLP defines as retryable; the processor, not this transport, decides about a retry. */
|
|
25
|
+
const RETRYABLE_STATUSES = new Set([429, 502, 503, 504]);
|
|
26
|
+
/** Reads at most `limit` bytes of `response`'s body; past it the stream is cancelled and the body is not kept. */
|
|
27
|
+
async function readBoundedBody(response, limit) {
|
|
28
|
+
if (response.body === null)
|
|
29
|
+
return { exceeded: false, bytes: new Uint8Array() };
|
|
30
|
+
const reader = response.body.getReader();
|
|
31
|
+
const chunks = [];
|
|
32
|
+
let size = 0;
|
|
33
|
+
for (let chunk = await reader.read(); !chunk.done; chunk = await reader.read()) {
|
|
34
|
+
size += chunk.value.byteLength;
|
|
35
|
+
if (size > limit) {
|
|
36
|
+
await reader.cancel();
|
|
37
|
+
return { exceeded: true };
|
|
38
|
+
}
|
|
39
|
+
chunks.push(chunk.value);
|
|
40
|
+
}
|
|
41
|
+
const bytes = new Uint8Array(size);
|
|
42
|
+
let offset = 0;
|
|
43
|
+
for (const chunk of chunks) {
|
|
44
|
+
bytes.set(chunk, offset);
|
|
45
|
+
offset += chunk.byteLength;
|
|
46
|
+
}
|
|
47
|
+
return { exceeded: false, bytes };
|
|
48
|
+
}
|
|
49
|
+
const JsonTextSchema = z.string().transform((text, context) => {
|
|
50
|
+
const parsed = attempt(() => JSON.parse(text));
|
|
51
|
+
if (!parsed.failed)
|
|
52
|
+
return z.unknown().parse(parsed.value);
|
|
53
|
+
context.issues.push({ code: 'custom', message: 'not JSON', input: undefined });
|
|
54
|
+
return z.NEVER;
|
|
55
|
+
});
|
|
56
|
+
/** Sends serialized OTLP requests with `fetch` and exactly the headers it was given. */
|
|
57
|
+
export class RuntimeOtlpTransport {
|
|
58
|
+
runtime;
|
|
59
|
+
url;
|
|
60
|
+
headers;
|
|
61
|
+
/** The header values this transport sends: every report removes them from what it carries. */
|
|
62
|
+
secrets;
|
|
63
|
+
/**
|
|
64
|
+
* The failure the SDK is handed for a request that did not complete: typed, its
|
|
65
|
+
* description scrubbed of the endpoint credentials and of every header value
|
|
66
|
+
* (a transport can echo a header it refused, value included). The raw failure
|
|
67
|
+
* is never handed on: the SDK's global error handler would print it.
|
|
68
|
+
*/
|
|
69
|
+
requestFailure;
|
|
70
|
+
closed = false;
|
|
71
|
+
constructor(options) {
|
|
72
|
+
this.runtime = options.runtime;
|
|
73
|
+
this.url = options.url;
|
|
74
|
+
this.headers = options.headers ?? {};
|
|
75
|
+
this.secrets = Object.values(this.headers);
|
|
76
|
+
const describe = createEndpointFailureSchema(this.url, this.secrets);
|
|
77
|
+
const endpoint = RedactedEndpointSchema.parse(this.url);
|
|
78
|
+
this.requestFailure = describe.transform((failure) => new CapabilityError(`The OTLP log export request failed: ${failure.name}: ${failure.message}`, 'UNAVAILABLE', {
|
|
79
|
+
reason: 'otlp-export-failed', retryable: false, details: { endpoint }
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
async send(data, timeoutMillis) {
|
|
83
|
+
const response = this.closed
|
|
84
|
+
? { status: 'failure', error: new CapabilityError('The OTLP log exporter is shut down.', 'UNAVAILABLE', { reason: 'otlp-exporter-closed' }) }
|
|
85
|
+
: await this.post(data, timeoutMillis);
|
|
86
|
+
if (response.status !== 'success')
|
|
87
|
+
await this.report(response);
|
|
88
|
+
return response;
|
|
89
|
+
}
|
|
90
|
+
shutdown() {
|
|
91
|
+
this.closed = true;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* One request, its success body included, under one lifecycle deadline: a
|
|
95
|
+
* collector that answers its headers and then stalls the body fails at the
|
|
96
|
+
* deadline like one that never answers, and the request is aborted.
|
|
97
|
+
*/
|
|
98
|
+
async post(data, timeoutMillis) {
|
|
99
|
+
const controller = new AbortController();
|
|
100
|
+
const exchange = settle((async () => {
|
|
101
|
+
const response = await fetch(this.url, {
|
|
102
|
+
method: 'POST', headers: { ...this.headers, 'Content-Type': 'application/json' }, body: data.slice(), signal: controller.signal
|
|
103
|
+
});
|
|
104
|
+
// The body is read here, bounded, and its partial success reported; the SDK is handed none, so its own
|
|
105
|
+
// diag-only handler never sees it and the rejection is reported exactly once.
|
|
106
|
+
return response.ok
|
|
107
|
+
? { ok: true, body: await readBoundedBody(response, OTLP_RESPONSE_BODY_LIMIT_BYTES) }
|
|
108
|
+
: { ok: false, status: response.status };
|
|
109
|
+
})());
|
|
110
|
+
const waited = await settle(this.runtime.lifecycle.wait(() => exchange, { timeoutMs: timeoutMillis, reason: 'logging-otlp-export' }));
|
|
111
|
+
const answered = waited.failed ? waited : waited.value;
|
|
112
|
+
if (answered.failed) {
|
|
113
|
+
controller.abort(answered.cause);
|
|
114
|
+
return { status: 'failure', error: this.requestFailure.parse(answered.cause) };
|
|
115
|
+
}
|
|
116
|
+
const answer = answered.value;
|
|
117
|
+
if (answer.ok) {
|
|
118
|
+
await this.reportSuccessBody(this.readSuccessBody(answer.body));
|
|
119
|
+
return { status: 'success' };
|
|
120
|
+
}
|
|
121
|
+
const error = new CapabilityError('The OTLP collector rejected the log export.', 'UNAVAILABLE', {
|
|
122
|
+
reason: 'otlp-export-rejected', details: { status: answer.status, endpoint: RedactedEndpointSchema.parse(this.url) }
|
|
123
|
+
});
|
|
124
|
+
return RETRYABLE_STATUSES.has(answer.status) ? { status: 'retryable', error } : { status: 'failure', error };
|
|
125
|
+
}
|
|
126
|
+
readSuccessBody(body) {
|
|
127
|
+
if (body.exceeded)
|
|
128
|
+
return { kind: 'unreadable', why: 'too-large' };
|
|
129
|
+
if (body.bytes.byteLength === 0)
|
|
130
|
+
return { kind: 'accepted' };
|
|
131
|
+
const json = JsonTextSchema.safeParse(new TextDecoder().decode(body.bytes));
|
|
132
|
+
if (!json.success)
|
|
133
|
+
return { kind: 'unreadable', why: 'not-json' };
|
|
134
|
+
const response = OtlpExportResponseSchema.safeParse(json.data);
|
|
135
|
+
if (!response.success)
|
|
136
|
+
return { kind: 'unreadable', why: 'not-an-export-response' };
|
|
137
|
+
const rejection = readOtlpPartialRejection('logs', response.data, this.url, this.secrets);
|
|
138
|
+
return rejection ? { kind: 'rejected', rejection } : { kind: 'accepted' };
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* A partial rejection is a collector failure and is reported once, by count
|
|
142
|
+
* (the collector's message scrubbed and bounded). A body that cannot be read
|
|
143
|
+
* as an OTLP/JSON export response cannot confirm the batch was accepted, so
|
|
144
|
+
* that is reported too, by why, never by its text.
|
|
145
|
+
*/
|
|
146
|
+
async reportSuccessBody(body) {
|
|
147
|
+
if (body.kind === 'accepted')
|
|
148
|
+
return;
|
|
149
|
+
const logger = await createFallbackLogger('logging:otel-sink', this.runtime);
|
|
150
|
+
const endpoint = RedactedEndpointSchema.parse(this.url);
|
|
151
|
+
if (body.kind === 'unreadable') {
|
|
152
|
+
logger.error('OTLP collector response could not be read', { endpoint, reason: 'otlp-response-unreadable', why: body.why });
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const report = { endpoint, reason: 'otlp-partial-rejection', signal: body.rejection.signal, rejected: body.rejection.rejected };
|
|
156
|
+
if (body.rejection.errorMessage !== undefined)
|
|
157
|
+
report.errorMessage = body.rejection.errorMessage;
|
|
158
|
+
logger.error('OTLP collector rejected log records', report);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* The SDK's own callback is silent by default: the failure is reported through the runtime, endpoint credentials
|
|
162
|
+
* removed. A failed request's error is already {@link requestFailure}'s, scrubbed of the header values; a
|
|
163
|
+
* rejecting status and a closed transport carry none.
|
|
164
|
+
*/
|
|
165
|
+
async report(response) {
|
|
166
|
+
const logger = await createFallbackLogger('logging:otel-sink', this.runtime);
|
|
167
|
+
logger.error('OTLP log export failed', {
|
|
168
|
+
endpoint: RedactedEndpointSchema.parse(this.url), error: createEndpointFailureSchema(this.url).parse(response.error)
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/** The log exporter: the SDK's export delegate over this module's transport, reading no ambient environment. */
|
|
173
|
+
export function createRuntimeOtlpLogExporter(modules, options) {
|
|
174
|
+
const { exporterBase, transformer } = modules;
|
|
175
|
+
const shared = exporterBase.mergeOtlpSharedConfigurationWithDefaults({ timeoutMillis: OTLP_EXPORT_TIMEOUT_MS }, {}, exporterBase.getSharedConfigurationDefaults());
|
|
176
|
+
return new exporterBase.OTLPExporterBase(exporterBase.createOtlpNetworkExportDelegate(shared, transformer.JsonLogsSerializer, new RuntimeOtlpTransport(options)));
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=otlp-log-exporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otlp-log-exporter.js","sourceRoot":"","sources":["../../../../src/otel/sinks/otel/otlp-log-exporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,eAAe,EAAmB,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,wBAAwB,EAA6B,MAAM,uCAAuC,CAAC;AAGtK,mDAAmD;AACnD,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE7C,kHAAkH;AAClH,MAAM,kBAAkB,GAAwB,IAAI,G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