skuzzle / cmp

Create and share public counters
https://countmy.pizza
MIT License
6 stars 1 forks source link

Messages containing a stack trace seem not to be logged correctly #66

Closed skuzzle closed 4 years ago

skuzzle commented 4 years ago

...or atl all? Haven't seen one in Loki so far

skuzzle commented 4 years ago

Sadly, loki labels seem to have a length limit:

fc589d7ed4e09cda931c096c226ef0aabd8bdbe01c7c3a6ed3a57066 component=client host=loki.taddiken.net msg=\"final error sending batch\" status=400 error=\"server returned HTTP status 400 Bad Request (400): label value too long: \\\"java.lang.IllegalStateException: null\\\\n\\\\tat de.skuzzle.cmp.counter.frontpage.FrontpageController.createTallySheet(FrontpageController.java:90)\\\\n\\\\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl\\\" metric \\\"{container_name=\\\\\\\"issue-66_cmpfrontend.1.fcwmvae4kh1cje64gsseymn9w\\\\\\\", filename=\\\\\\\"/var/log/docker/ac19d0d0fc589d7ed4e09cda931c096c226ef0aabd8bdbe01c7c3a6ed3a57066\\\\\\\", host=\\\\\\\"rv1324\\\\\\\", level=\\\\\\\"ERROR\\\\\\\", levelValu\\\"\"" plugin=93aa71f0fac1f088f4804d8cd13ff4f1817f08838024c1e37c158307b8b3add4

So we can not parse the stack_trace field as a label. Thats not as bad because it will be displayed atomically anyways by grafana under 'parsed values'

skuzzle commented 4 years ago

Adjusted loki-pipeline config to not add stackTrace as a label