hypertrace / javaagent

Hypertrace OpenTelemetry Java agent with payload/body and headers data capture.
Apache License 2.0
30 stars 15 forks source link

🐛 Charset quality factor #344

Closed ryandens closed 3 years ago

ryandens commented 3 years ago

Description

Handle charset with quality factor. We came across this log message in a service that uses this java agent:

[opentelemetry.auto.trace 2021-06-29 16:43:30:382 +0000] [reactor-http-epoll-3] ERROR org.hypertrace.agent.core.instrumentation.utils.ContentTypeCharsetUtils - Could not parse encoding utf-8;q=.2 to charset, using default ISO-8859-1

Testing

Added a unit test with a valid Content-Type header containing a charset with a quality factor.

Checklist:

Documentation

Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.