Closed nikostoulas closed 11 months ago
@nikostoulas Should we maybe add the breaking changes on readme or it will be a part of another PR?
@nikostoulas Should we maybe add the breaking changes on readme or it will be a part of another PR?
You mean the orka's version changelog? Yes it will be part of another one
Description
The main focus is on improving logging and header propagation. Non json logger is improved to log all propagated headers. Messages in RabbitMQ by default now propagated all headers. Configuration is updated and istioTraceContextHeaders is merged with headerPropagation into a new more generic property:
propagatedHeaders
This is not backwards compatible so a major release will need to follow when merging this pr.Best reviewed commit by commit.
Aoart from propagated headers 3 new headers are introduced:
x-depth
-> increased by 1 every time headers are propagated (e.g. to a rabbitmq publish or http call)x-parent-id
-> is the previous traceHeaderName id. The new traceHeaderName id is a new random one and this happens every 2 hopsx-initiator-id
-> when ax-parent-id
id replaced the initial traceHeaderName is added in the context here so that we can search with the initial id and find all changesChanges
propagatedHeaders
and utilities for managing themalsSupported
chalk
library for better console outputsJira tickets
Before
Performance
After
Performance
Example tests were run:
npx nodemon examples/request-context-example/app.js
Way of running performance tests:
ab -k -n 100000 -c 1 -H 'x-orka-request-id: bar' localhost:2121/log
Performance impact is not insignificant but would be negligible part of an http endpoint that accesses IO operations (e.g. database/ network)