contribsys / faktory

Language-agnostic persistent background job server
https://contribsys.com/faktory/
Other
5.78k stars 230 forks source link

Custom data stripped on batch callbacks for trace metadata propagation #462

Closed TurtleSRE closed 10 months ago

TurtleSRE commented 10 months ago

Using the latest Faktory enterprise version (1.8.0), batch callback jobs have their custom data stripped (i.e. inspecting the batch via UI shows the custom data is no longer there). When those custom jobs are then enqueued at the end of a batch, they only have _bid and _cb attributes set in custom data. This is an issue for using custom data to propagate trace metadata (populated by middleware).

Is this intended behaviour or a bug (documentation doesn't make it clear either way)? If it's intended, how should we propagate metadata for distributed tracing?

mperham commented 10 months ago

Can you give me a piece of code which reproduces the problem and shows how you are constructing the batch?