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

EventReceiverFirehoseMonitor #1791

Merged
merged 1 commit into from
Nov 10, 2015

Conversation

guobingkun
Copy link
Contributor

add an EventReceiverFirehoseMonitor so that we can monitor how many
events have been queued in the EventReceiverFirehose and get a sense
about whether the firehose is under too much pressure.

String.valueOf(metric.getCapacity())
);

emitter.emit(builder.build("ingest/firehose/bufferSize", metric.getCurrentBufferSize()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we please call this ingest/events/buffered

also please add this to docs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Changed metric name and added into metric doc.

@guobingkun guobingkun force-pushed the event_receiver_firehose_monitor branch 3 times, most recently from 83fb430 to 6f07a96 Compare October 1, 2015 17:56
@@ -87,6 +87,7 @@ Memcached client metrics are reported as per the following. These metrics come d
|`ingest/events/thrownAway`|Number of events rejected because they are outside the windowPeriod.|dataSource.|0|
|`ingest/events/unparseable`|Number of events rejected because the events are unparseable.|dataSource.|0|
|`ingest/events/processed`|Number of events successfully processed.|dataSource.|Equal to your # of events.|
|`ingest/events/buffered`|Number of events queued in the EventReceiverFirehose's buffer|serviceName, bufferCapacity.|Equal to current # of events in the buffer queue.|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this metric will not get published by default, user would have to add that to druid.monitor.monitors property ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, you are right. Modified doc.

@guobingkun guobingkun force-pushed the event_receiver_firehose_monitor branch 2 times, most recently from 0bd351d to 515eb31 Compare October 2, 2015 15:31
@himanshug
Copy link
Contributor

LGTM

@guobingkun guobingkun force-pushed the event_receiver_firehose_monitor branch from e0062a2 to c4d3653 Compare October 3, 2015 02:42
@nishantmonu51
Copy link
Member

Is it possible to have a generic FirehoseMonitor which can be configured in runtime.properties and emits events related to the firehose in use e.g buffered/events, batch size etc for eventReceiverFirehose and for kafka firehose emit kafka related metrics like kafka backlog etc.
for now it can only support EventReceiverFirehose.

@cheddar
Copy link
Contributor

cheddar commented Oct 5, 2015

@nishantmonu51 The metrics being exposed here are pretty specific to the EventReceiverFirehose so I'm not sure what extra metrics a generic firehose would meaningfully provide?

@guobingkun guobingkun force-pushed the event_receiver_firehose_monitor branch from c4d3653 to 86d1e4d Compare October 6, 2015 18:01
@himanshug
Copy link
Contributor

@nishantmonu51 further thoughts?

@nishantmonu51
Copy link
Member

@cheddar, @guobingkun, by generic i meant is it possible to have the glue code for emitting metrics (like FirehoseRegister and Monitor) to be reUsable by multiple firehoses so that If we implement metrics for any other firehose we wont have to write similar things again and the logic for what metrics to be emitted can be part of the firehose itself and will be specific to them.

@nishantmonu51
Copy link
Member

btw, I am also fine with doing things as per the current impl and restructuring code when we need to emit metrics for other firehoses too.

@guobingkun
Copy link
Contributor Author

@nishantmonu51 It's possible to make a generic FirehoseRegister + FirehoseMonitor and let each firehose implement a FirehoseMetric. Though I prefer not to do it now since it's quite a different direction from what this PR was originally going, there will also be different concurrent issues need to be resolved if we do it in a generic way.

@nishantmonu51
Copy link
Member

👍

public void unregister(String serviceName)
{
log.info("Unregistering EventReceiverFirehoseMetric for service [%s]", serviceName);
metrics.remove(serviceName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check return value and log if not found?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drcrallen Added a log message

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drcrallen Any update on this one?

add an EventReceiverFirehoseMonitor so that we can monitor how many
events have been queued in the EventReceiverFirehose and get a sense
about whether the firehose is under too much pressure.
@guobingkun guobingkun force-pushed the event_receiver_firehose_monitor branch from 86d1e4d to c3b6fcc Compare October 30, 2015 16:40
@guobingkun guobingkun closed this Oct 30, 2015
@guobingkun guobingkun reopened this Oct 30, 2015
@guobingkun
Copy link
Contributor Author

bouncing for unrelated test failure.

@guobingkun guobingkun closed this Nov 2, 2015
@guobingkun guobingkun reopened this Nov 2, 2015
@guobingkun guobingkun closed this Nov 3, 2015
@guobingkun guobingkun reopened this Nov 3, 2015
xvrl added a commit that referenced this pull request Nov 10, 2015
@xvrl xvrl merged commit cf77994 into apache:master Nov 10, 2015
@guobingkun guobingkun deleted the event_receiver_firehose_monitor branch November 10, 2015 19:12
This was referenced Dec 1, 2015
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.

7 participants