Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add watermill event histogram #1329

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Oct 30, 2023

We're able to get a histogram of how long does it take for the
individual watermill events to execute:

elapsed while executing the handler function in seconds
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.0005"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.001"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.0025"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.005"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.01"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.025"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.05"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.1"}
2
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.25"}
2
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.5"}
2
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="1"}
2
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="+Inf"}
2
mediator_eventer_handler_execution_time_seconds_sum{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true"}
0.125726416
mediator_eventer_handler_execution_time_seconds_count{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true"}
2

We're able to get a histogram of how long does it take for the
individual watermill events to execute:
```
elapsed while executing the handler function in seconds
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.0005"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.001"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.0025"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.005"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.01"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.025"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.05"}
0
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.1"}
2
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.25"}
2
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="0.5"}
2
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="1"}
2
mediator_eventer_handler_execution_time_seconds_bucket{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true",le="+Inf"}
2
mediator_eventer_handler_execution_time_seconds_sum{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true"}
0.125726416
mediator_eventer_handler_execution_time_seconds_count{handler_name="github.com/stacklok/mediator/internal/engine.(*Executor).HandleEntityEvent-fm-internal.entity.event",success="true"}
2
```
@jhrozek jhrozek merged commit d74f618 into mindersec:main Oct 30, 2023
12 checks passed
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.

3 participants