lukevenediger / statsd.net

A high-performance stats collection service that feeds into Graphite and aimed at small- to large-scale windows environments.
MIT License
123 stars 25 forks source link

Metric processing crashes when bad set message is received #42

Open justdaver opened 9 years ago

justdaver commented 9 years ago

When a client sends an incorrectly formatted metric of the set type, the statsd.net service throws an exception error and then stops processing metrics. The service does not crash however and seems to stay running. As a temporary fix a manual service restart of statsd.net is required to get metrics processing again.

2015-01-13 15:03:41,623 [92] ERROR - MessageParser has faulted. Error: ArgumentOutOfRangeException 
System.ArgumentOutOfRangeException: Set Parameter name: StatsdMessage.MessageType at 
statsd.net.Framework.StatsdMessageRouterBlock.OfferMessage(DataflowMessageHeader messageHeader, 
StatsdMessage messageValue, ISourceBlock`1 source, Boolean consumeToAccept) in c:.net.net.cs:line 
70 at System.Threading.Tasks.Dataflow.Internal.SourceCore`1.OfferMessageToTarget(DataflowMessageHeader 
header, TOutput message, ITargetBlock`1 target, Boolean& messageWasAccepted) at 
System.Threading.Tasks.Dataflow.Internal.SourceCore`1.OfferToTargets(ITargetBlock`1 linkToTarget) at 
System.Threading.Tasks.Dataflow.Internal.SourceCore`1.OfferMessagesLoopCore() _

This seems to affect v1.5.0.0 and can be reproduced by using the LogSet function of statsdcsharpclient 1.3 when sending metrics.