pystorm / streamparse

Run Python in Apache Storm topologies. Pythonic API, CLI tooling, and a topology DSL.
http://streamparse.readthedocs.io/
Apache License 2.0
1.5k stars 218 forks source link

How to define and use storm metrics ? #387

Closed tinduong94 closed 7 years ago

tinduong94 commented 7 years ago

I want to use storm metrics to monitor the performance of spouts and bolts but didn't figure out the way. Any help on this ?

dan-blanchard commented 7 years ago

I have not actually done this myself, but there's documentation here. (The "Note" part was previously missing due to a typo in the docstring, but I fixed that.) I do not currently know of a way to register the metric from the Python side.

tinduong94 commented 7 years ago

Thanks @dan-blanchard Actually I've already seen that API, and still the same question remains. Anyone know how to register the metric in Python ?

dan-blanchard commented 7 years ago

@tinduong94 There is no way to define/register it from Python, because there is no Storm Multilang API call for it, and there's no Thrift method we could use either.

ghost commented 6 years ago

@dan-blanchard Is report_metric function Streamparse's replacement for Storm native metrics? Will calls to it be reflected in Storm UI?

dan-blanchard commented 6 years ago

@ivanalikin-saritasa If you write the Java code to register the metrics, they will appear. I've just never tried to do that part. report_metric will pass the appropriate Storm Multilang messages to Storm to report them, but unless they're registered, I don't believe they'll show up. @HeartSaVioR might be able to answer that one though.