-
Notifications
You must be signed in to change notification settings - Fork 69
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
Update java rules for parsing stacktraces to incude preceding ERROR messages #11
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it!
…On Tue, Mar 28, 2017 at 2:49 PM, googlebot ***@***.***> wrote:
Thanks for your pull request. It looks like this may be your first
contribution to a Google open source project. Before we can look at your
pull request, you'll need to sign a Contributor License Agreement (CLA).
📝 *Please visit https://cla.developers.google.com/
<https://cla.developers.google.com/> to sign.*
Once you've signed, please reply here (e.g. I signed it!) and we'll
verify. Thanks.
------------------------------
- If you've already signed a CLA, it's possible we don't have your
GitHub username or you're using a different email address. Check your
existing CLA data <https://cla.developers.google.com/clas> and verify
that your email is set on your git commits
<https://help.github.com/articles/setting-your-email-in-git/>.
- If you signed the CLA as a corporation, please let us know the
company's name.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AX3qTZ9pVSEbjYokd5DmZ6R6Z6DdlN8kks5rqQ_QgaJpZM4Mrpct>
.
--
------------------------------
This email and any attachments to it may be confidential and are intended
solely for the use of the individual(s) to whom it is addressed. Any views
or opinions expressed are solely those of the author and do not necessarily
represent those of Telecom Plus PLC (company registered in England No.
3263464, registered office: Network HQ, 508 Edgware Road, The Hyde, London,
NW9 5AB).
If you are not the intended recipient of this email, you must neither take
any action based upon its contents, nor copy or show it to anyone. Please
contact the sender if you believe you have received this email in error,
and delete it.
<https://mail.google.com/mail/u/0/#>
|
CLAs look good, thanks! |
Hi @jcotado, Thank you so much for suggesting this change! Seems like you are trying to add the error message to the combined log entry, which is a valid use case. Yet the format we are coding against here is kind of too specific. We will consider adding support for this use case. It probably would be implemented in a more generic way through a language-independent config option though. Before we could provide something like that, an easy workaround is to just use in_tail plugin. Please refer to the doc here for a proper regex for your case. |
@qingling128 To clatify, this is fairly standard parsing rules for Java application stacktrace, but it doesn't fit your (internal?) use case? Also regarding you advise to use |
@george-angel Yeah, the stacktrace parsing part is indeed standard. e.g.:
This is supported by the current implementation. Seems our unit test cases do not cover yet though. I will add some test case for this. What I mentioned that was not very generic is to bundle the As to Is the support for standard java stacktrace parsing (example above) enough for your use case? Or is it a must have to bundle the error message with the combined log entry? If so, do you mind helping us to understand the use case a bit more? This would help us prioritize feature requests like this. |
Good morning Ling,
You're right saying the ERROR ... line is not produced by the Java standard
but 90% of the productive Java applications use a log framework (in our
case logback). That's the reason of appending at the beginning ERROR ...
I strongly believe that the parser should include that "extra" line in case
of exists.
Please find below an example of our exception:
ERROR [2017-03-21 07:16:42,627] u.s.d.Jobs <http://u.s.d.jobs/> {}
uw.smartmetering.domain.Jobs <http://uw.smartmetering.domain.jobs/>:
Job uw.smartmetering.tma.PollStatusFeedJob@7091121b failed
javax.ws.rs.ProcessingException:
org.apache.http.conn.ConnectTimeoutException: Connect to
ssp-api-stg01.tmadata.co.uk:443
[ssp-api-stg01.tmadata.co.uk/80.195.118.185,
ssp-api-stg01.tmadata.co.uk/217.138.85.11] failed: connect
at io.dropwizard.client.DropwizardApacheConnector.apply(DropwizardApacheConnector.java:109)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:252)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:684)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:681)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:681)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:411)
at uw.tmaclient.TmaClient$_makeRequestNoValidation_closure7.doCall(TmaClient.groovy:144)
at uw.circuitbreaker.Circuit.withBreaker(Circuit.groovy:33)
at uw.tmaclient.TmaClient.makeRequestNoValidation(TmaClient.groovy:134)
at uw.tmaclient.TmaClient$_makeRequest_closure6.doCall(TmaClient.groovy:112)
at uw.circuitbreaker.Circuit.withBreaker(Circuit.groovy:33)
at uw.tmaclient.TmaClient.makeRequest(TmaClient.groovy:110)
at uw.tmaclient.TmaClient.doGet(TmaClient.groovy:107)
at uw.tmaclient.TmaClient.get(TmaClient.groovy:86)
at uw.tmaclient.TmaStatusClient.getSince(TmaStatusClient.groovy:31)
at uw.smartmetering.tma.StatusFeedConsumer.doForEachNewStatus(StatusFeedConsumer.groovy:34)
at uw.smartmetering.tma.StatusFeedConsumer.forEachNewStatus(StatusFeedConsumer.groovy:24)
at uw.smartmetering.tma.PollStatusFeedJob.run(PollStatusFeedJob.groovy:44)
at uw.smartmetering.domain.Jobs
<http://uw.smartmetering.domain.jobs/>$_run_closure1$_closure2.doCall(Jobs.groovy:49)
at uw.smartmetering.domain.Jobs
<http://uw.smartmetering.domain.jobs/>$_run_closure1.doCall(Jobs.groovy:47)
at uw.smartmetering.db.DbLock.ifOwned(DbLock.groovy:40)
at uw.smartmetering.domain.Jobs.run(Jobs.groovy:43)
at uw.smartmetering.http.TriggerJobsResource.triggerJobs(TriggerJobsResource.groovy:27)
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to
ssp-api-stg01.tmadata.co.uk:443
[ssp-api-stg01.tmadata.co.uk/80.195.118.185,
ssp-api-stg01.tmadata.co.uk/217.138.85.11] failed: connect timed out
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:150)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
at io.dropwizard.client.DropwizardApacheConnector.apply(DropwizardApacheConnector.java:87)
... 26 common frames omitted
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:207)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:337)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)
... 36 common frames omitted
Thanks,
Javi
…On Wed, Mar 29, 2017 at 5:17 PM, Ling Huang ***@***.***> wrote:
@george-angel <https://github.com/george-angel> Yeah, the stacktrace
parsing part is indeed standard. e.g.:
SomeException: foo
at bar
Caused by: org.AnotherException
at bar2
at bar3
This is supported by the current implementation. Seems our unit test cases
do not cover yet though. I will add some test case for this.
What I mentioned that was not very generic is to bundle the ERROR
<some_error_message> line to the combined log entry. Since the ERROR ...
line is not produced by the Java standard e.printStackTrace(). It's
probably from a separate line in the code to print the error I guess? And
that format can vary based on developers' preference. This is not Java
specific, but should be applied to all languages. And we would want to make
the format configurable by developers.
As to in_tail plugin, it might be a different story when it comes to
kubernetes. kubernetes relies on a built-in fluentd-gcp image for
logging. In older kubernetes versions the fluentd configs are built into
the image. The latest version should support mounting the config under
/etc/fluentd/config.d, but it's not fully GA yet.
Is the support for standard java stacktrace parsing (example above) enough
for your use case? Or is it a must have to bundle the error message with
the combined log entry? If so, do you mind helping us to understand the use
case a bit more? This would help us prioritize feature requests like this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AX3qTTduKbx5K_VSKV5vAt2mh9zqiMItks5rqoQNgaJpZM4Mrpct>
.
--
------------------------------
This email and any attachments to it may be confidential and are intended
solely for the use of the individual(s) to whom it is addressed. Any views
or opinions expressed are solely those of the author and do not necessarily
represent those of Telecom Plus PLC (company registered in England No.
3263464, registered office: Network HQ, 508 Edgware Road, The Hyde, London,
NW9 5AB).
If you are not the intended recipient of this email, you must neither take
any action based upon its contents, nor copy or show it to anyone. Please
contact the sender if you believe you have received this email in error,
and delete it.
<https://mail.google.com/mail/u/0/#>
|
No description provided.