Metrics and stream processor improvements #769
Merged
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.
Summary
This release adds OpenTelemetry metrics to the runtime. It also changes the behavior of stream processors to be able to provide consumer lag metrics for all event handlers.
Stream processors
Previously if the event handler did not consume an event, it would also not update its current offset in the event log at all. Only processed events would cause an update. This release changes that, so all events are taken into consideration when storing how far each handler is in the stream. This allows the runtime to also provide consumer lag metrics that reflects this offset against the latest committed event.
OpenTelemetry
OpenTelemetry metrics will be enabled by default if there is defined an OpenTelemetry endpoint to publish to.
It can be disabled with
Dolittle__Runtime__OpenTelemetry__Tracing=false
Added
dolittle_customer_runtime_stream_processor_consumer_lag
dolittle_customer_runtime_stream_processors_offset
dolittle_customer_runtime_stream_processors_processed_total
Changed