Skip to content

deps: upgrade js-logger to v5 to support alloy (MAPCO-10962)#114

Merged
roicohen326 merged 5 commits into
masterfrom
feature/MAPCO-10962-upgrade-js-logger-v5
Jul 13, 2026
Merged

deps: upgrade js-logger to v5 to support alloy (MAPCO-10962)#114
roicohen326 merged 5 commits into
masterfrom
feature/MAPCO-10962-upgrade-js-logger-v5

Conversation

@roicohen326

Copy link
Copy Markdown
Contributor
Question Answer
Bug fix
New feature
Breaking change
Deprecations
Documentation
Tests added
Chore

Summary

Upgrades @map-colonies/js-logger to ^5.0.0 (async, named export) so this service
can ship logs via OTLP to Alloy. Bumps @map-colonies/schemas to ^1.18.0 for the
logger schema that adds telemetry.logger.opentelemetryOptions, wired through config
and the helm chart (disabled by default). Adds K8S_POD_UID to the deployment for
OTel pod attribution.

Bumps js-logger to v5 (async, named export) and schemas to the
version exposing the v2 logger schema, wires up opentelemetryOptions
through config and the helm chart so logs can be shipped via OTLP
to Alloy.
mc-priority-queue@8.2.2 and mc-utils@3.2.0 still declare a stale
js-logger@^1.0.1 peerDependency, which conflicts with the v5 bump and
breaks npm ci. Both packages only reference the js-logger Logger type
(never its factory function), so the peer range is stale rather than a
real incompatibility. Override it to resolve against the root's
installed js-logger version instead of bumping the whole
raster-shared/mc-model-types major line, which is unrelated to this
ticket.
Comment thread config/custom-environment-variables.json
Comment thread helm/templates/_helpers.tpl Outdated
Comment thread helm/templates/configmap.yaml
Comment thread helm/values.yaml Outdated
Comment thread src/containerConfig.ts
Address review feedback: replace the ad-hoc global/env if-else helpers
with a single common.openTelemetryOptions.merged definition using the
existing common.tplvalues.merge pattern, and consume the merged dict
in configmap.yaml. Also leave env.openTelemetryOptions.url empty,
since a concrete default there would win over a global override in
the merge (env is merged first).
Adds telemetry.logger.opentelemetryOptions.resourceAttributes, mapped
from OPENTELEMETRY_RESOURCE_ATTRIBUTES, and threads it through the
helm chart. Not yet declared in @map-colonies/schemas, but verified
it validates and survives config resolution end-to-end (ajv here has
no removeAdditional, and the opentelemetryOptions sub-schema has no
unevaluatedProperties restriction), and js-logger's own LoggerOptions
type already accepts it.
Comment thread config/custom-environment-variables.json Outdated
Matches the convention already used by other services in this cluster
(e.g. raster-ingestion-dev-overseer). The schemas package's declared
x-env-value (OTLP_LOGGER_ENDPOINT_URL) doesn't match what's actually
deployed. Per review feedback.
@roicohen326 roicohen326 merged commit bcfb791 into master Jul 13, 2026
5 checks passed
@roicohen326 roicohen326 deleted the feature/MAPCO-10962-upgrade-js-logger-v5 branch July 13, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants