-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access Log Parsing - Latency not recorded. #1339
Comments
Even the NGINX documentation referenced in the source code documents how latency should be appended to the logs.
However the nginx.go ops agent implementation does not support this either. |
Hi @codeconsole, Thank you for your feedback. To clarify, this is working as intended, and the documentation doesn't require any particular sub-fields of In general, third-party integrations in the Ops Agent, such as the Tomcat receivers, are designed to work out-of-the-box with default application configurations. Since latency is not logged by default, it is not included in the regex. You can still define custom behavior, including custom regexes, by defining a |
Hi @jefferbrecht, Thanks, I wasn't aware of the parse_regex + modify_fields existence. I am not sure if that existed when I originally switched from the legacy agent a couple years ago. I was able to get it to work, however, having to use modify_fields seems a bit overkill. Previously the legacy agent used convention over configuration. Why not provide something similar? This is a bit ugly:
I suggest at least providing an option that does automatic jsonPayload mapping if any of these httpRequest fields are present. |
I was patiently hoping that Ops Agent would catch up to the capabilities of the legacy agent, but it has been a couple years now and it is still lagging in basic capabilities. One of which I find very important: the ability to pass latency into the logs.
One would expect this feature to exist and already be available based on existing documentation, but it does not. Nor is the documentation clear on why it does not work.
For example:
The current Tomcat documentation states "What is logged" in which it says "The tomcat_access logs contain the following fields in the LogEntry:" and specifies that httpRequest is one of those fields, but looking at the documentation for httpRequest indicates that latency is part of what is recorded and that is simply not the case.
Digging into the source, I see that tomcat_access uses genericAccessLogParser, but the
common_logging_processors.go
genericAccessLogParser method has no reference to latency:Previously in the legacy agent, you were able to override the regex. This is what I had done to get the legacy parser to work:
A simple solution would be to allow overriding the regex in the yaml configuration or just optionally append it in a non-breaking way to the url so that the format can be re-written to include latency. Then tomcat can be configured directly or via Spring Boot to add %Ts latency to the request.
The text was updated successfully, but these errors were encountered: