[Essentials] (client) Error Telemetry logging: JEP in early draft review

30 views
Skip to first unread message

Baptiste Mathus

unread,
Apr 4, 2018, 8:59:48 AM4/4/18
to Jenkins Developers
Hello everyone,

So as a followup on the recent discussions around telemetry logging for Essentials, I've drafted a JEP on this matter I would love to get feedback on:


Thanks!

-- Baptiste

Jesse Glick

unread,
Apr 4, 2018, 6:53:50 PM4/4/18
to Jenkins Dev
Seems reasonable.

The implementation separates JSON records with a newline. This is not
apparent from the JEP; it would be nice to mention it, so that readers
do not wonder whether you are using some kind of streaming JSON parser
(which is unnecessary when each line is a well-formed JSON document).

`JsonFormatter.formatException` can be replaced with
`Functions.printThrowable`, which formats chained exceptions more
readably. The JEP proposal for a future `stacktrace` field neglects to
mention that this will not work as is for exceptions with causes
and/or suppressed exceptions. In general `Throwable.printStackTrace`
can be overridden in nontrivial ways, sometimes including information
not present in the `message` nor stack trace (though less so after
JENKINS-46140), so I would not recommend bothering with anything but a
plain printed string.

Baptiste Mathus

unread,
Apr 5, 2018, 3:38:45 AM4/5/18
to Jenkins Developers
2018-04-05 0:53 GMT+02:00 Jesse Glick <jgl...@cloudbees.com>:
Seems reasonable.

The implementation separates JSON records with a newline. This is not
apparent from the JEP; it would be nice to mention it, so that readers
do not wonder whether you are using some kind of streaming JSON parser
(which is unnecessary when each line is a well-formed JSON document).

Done.
 

`JsonFormatter.formatException` can be replaced with
`Functions.printThrowable`, which formats chained exceptions more
readably. The JEP proposal for a future `stacktrace` field neglects to
mention that this will not work as is for exceptions with causes
and/or suppressed exceptions. In general `Throwable.printStackTrace`
can be overridden in nontrivial ways, sometimes including information
not present in the `message` nor stack trace (though less so after
JENKINS-46140), so I would not recommend bothering with anything but a
plain printed string.

Ack. Adjusted the proposal too, thanks a lot.

I will submit the PR to official JEP later today I think. Still giving it a few hours for some more feedback but I don't expect much pushback in this area and for such a small JEP anyway.

Cheers

Baptiste Mathus

unread,
Apr 5, 2018, 5:03:18 AM4/5/18
to Jenkins Developers
Submitted as https://github.com/jenkinsci/jep/pull/77

Thanks everyone for the feedback.

Baptiste Mathus

unread,
May 12, 2018, 5:32:51 AM5/12/18
to Jenkins Developers
Quick heads-up everyone. So since last email, the proposal got accepted as JEP-304.

After a discussion yesterday with Tyler, we discussed a small adjustment to make JSON parsing and evolution more straightforward, making the `exception` field an object instead of a string as it was currently.

Feel free to provide feedback here or on the PR.

Thanks!
Reply all
Reply to author
Forward
0 new messages