Release: develop -> main#3936
Merged
Merged
Conversation
…e + Log-Flut) (#3935) * fix(arkade): EventSource-Polyfill für Node-Runtime Das @arkade-os/sdk öffnet seine Settlement- (Batch-) und Contract-Event-Streams über ein globales EventSource. Node liefert EventSource nur hinter dem Flag --experimental-eventsource, daher warf jeder Stream auf unserer Runtime ReferenceError: EventSource is not defined. Folgen auf PRD: der periodische VTXO-Settle (alle ~5 Min) schlug hart fehl (Boarding-UTXOs wurden nicht eingebucht, ablaufende VTXOs nicht erneuert) und flutete die Logs; zusätzlich der ContractWatcher-Boot-Fehler. Fix: WHATWG-konformes eventsource@4 als globalen Polyfill in einem polyfills.ts registrieren, das in main.ts als Erstes importiert wird (vor jedem SDK-Code). Behebt beide Fehlerquellen an der Wurzel, ohne Node-Upgrade oder experimentelle Flags. Der ContractWatcher-Dispose (#3932) bleibt korrekt, da der Watcher ungenutzt ist. * test(arkade): sichere EventSource-Polyfill-Registrierung ab Fängt einen stillen Regress ab: ändert ein künftiger eventsource-Major die Export-Form, würde der Polyfill undefined registrieren und die SDK-Streams wieder werfen, ohne dass es jemand bemerkt.
* feat(observability): replace App Insights SDK with OpenTelemetry App Insights is no longer active in the new deployment. Replace the App Insights SDK with OpenTelemetry so request/dependency/exception telemetry flows into our self-hosted Grafana stack via OTLP. - add src/tracing.ts: NodeSDK with auto-instrumentations (HTTP/DB/NestJS) and an OTLP/HTTP trace exporter. The collector endpoint comes exclusively from OTEL_EXPORTER_OTLP_ENDPOINT; tracing is disabled when it is unset. 4xx server responses are marked non-failures in the HTTP response hook, replicating the old App Insights telemetry processor. - import the tracer first in main.ts (before any instrumented module) and drop the App Insights setup block. - DfxLogger: record exceptions/events on the active span and append the trace id to each log line so logs can be correlated to traces. - remove the applicationinsights dependency; document OTEL_EXPORTER_OTLP_ENDPOINT in .env.example. - unit tests for the 4xx classifier and the logger span integration. The collector/backend lives in a sibling infra change in our private deployment-config repo. * refactor(observability): enforce 4xx-not-a-failure via a span processor The HTTP responseHook ran before the instrumentation's own server-span status logic, so it could not override 4xx statuses. Replace it with a ClientErrorSpanProcessor that runs on span end (after instrumentation): it resets 4xx SERVER spans that were flagged ERROR (e.g. by a request that logs through DfxLogger.error) back to UNSET, so only 5xx count as failures — matching the old App Insights telemetry processor. Add unit tests for the processor and the status classifier. --------- Co-authored-by: David May <david.leo.may@gmail.com>
TaprootFreak
approved these changes
Jun 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic Release PR
This PR was automatically created after changes were pushed to develop.
Commits: 1 new commit(s)
Checklist