title: Spark metrics: Is there a way to add some json content at a configurable interval to spark metrics
body: <p>I am using spark metrics feature in my spark streaming application i am already adding two custom metric to spark metric system those are</p>
  
  <ol>
  <li>Incoming Events per second : using Spark Meter</li>
  <li>Number events successfully processed: using Spark counter</li>
  </ol>
  
  <p>The above metrics are written to CSV file by spark metric system as per configuration is metrics.properties</p>
  
  <p>Now my requirement is to add a json String at specified interval to spark metrics system.</p>
  
  <p>The output i am expecting is CSV file which will have data some thing like below</p>
  
  <p>1,jsonString1</p>
  
  <p>2,jsonString2</p>
  
  <p>or</p>
  
  <p>jsonString1</p>
  
  <p>jsonString2</p>
  
  <p>Please suggest a way to do this i searched a lot but could not get the answer i am expecting</p>
  
  <p>Thanks in advance!</p>