Plugin-Metrics icon indicating copy to clipboard operation
Plugin-Metrics copied to clipboard

Some Questions

Open md-5 opened this issue 11 years ago • 2 comments

  • Is UserAgent important, should I set this to something else since I am using a custom implementation?
  • Is it normal to be getting OK instead of the 0 response numeric? Are both 0 and OK the same thing?

Thanks

md-5 avatar Feb 21 '14 22:02 md-5

  • Under what circumstances is 2 - generate a new ID sent

md-5 avatar Feb 21 '14 22:02 md-5

  • Is UserAgent important, should I set this to something else since I am using a custom implementation?

For R7 onwards, yes. For R7 it uses MCStats/7. If it's not present, it will not be assumed it is R6 or below. R6 and below defaults to whatever the JVM uses (usually Java/1.x.y_zz)

R7 = JSON, gzipped or not gzipped (either or). If you happen to ever want to send the JSON as gzip (just passing it through a GZIPOutputStream), Content-Encoding would need to be set to gzip (it doesn't have to be present in the headers if plain text is used.)

R6 and below = HTTP POST

I believe you're sending JSON? So the MCStats/7 UA is needed to signify R7.

It's probably also a good idea to include Content-Length with the length of the request but it probably is not required (I don't use it myself, but jetty might be.)

  • Is it normal to be getting OK instead of the 0 response numeric? Are both 0 and OK the same thing?

They are synonymous however OK is only sent to <= R6 senders. 0 is sent for R7+ (mainly just to use that one less byte).

  • Under what circumstances is 2 - generate a new ID sent

Not used right now nor actually supported anywhere (IIRC). You can consider it not used or ever used.

I was going to look into using it at one point but I decided that having the MCStats servers having some say in what the server is doing shouldn't be done (even if it's just a Metrics config option being changed.)

Hidendra avatar Feb 21 '14 22:02 Hidendra