Skip to content

feat: metadata propagation through events#582

Open
jvillafanez wants to merge 1 commit intomainfrom
event_propagation
Open

feat: metadata propagation through events#582
jvillafanez wants to merge 1 commit intomainfrom
event_propagation

Conversation

@jvillafanez
Copy link
Copy Markdown
Member

@jvillafanez jvillafanez commented Apr 30, 2026

Allow sending metadata through the reva events. The PR also includes some tools for tracing events.

NOTE:

  • Not all the code have been checked and adapted. This means that some information might fail to propagate from top to bottom. While the event producers should work transparently, event consumers must be adapted.
  • Propagation through HTTP is part of a different PR (feat: [OCISDEV-533] Separate the storage-users and graph to handle vault storage #559 + the corresponding ocis PR).
  • The metadata.MD type will be changed later to a different custom type, as part of the metadata propagation refactor in a different PR. This should happen after we have an initial working version.

Expected usage

The event metadata will be automatically populated from the GRPC outgoing context. As said, this is temporary and a proper data structure will be used later.

The event publishers should work without any change. This works both for the metadata propagation and also for the producer-side event tracing.

For event consumers, the TraceEventConsumer (and the "WithTracer" variant) are provided as a common ground for tracing the events. The returned span needs to be closed manually (usually when the event has been processed), and the returned context should be used during the event processing.
Note that we usually want to start a new context whenever we start processing an event.
In addition, the event consumer must populate the GRPC outgoing context with the event metadata to ensure the metadata is propagated.

@jvillafanez jvillafanez force-pushed the event_propagation branch from 6c2d48a to d328b23 Compare May 6, 2026 07:45
@jvillafanez jvillafanez marked this pull request as ready for review May 6, 2026 08:51
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.

1 participant