Skip to content

Conversation

@eyalkoren
Copy link
Contributor

@eyalkoren eyalkoren commented Oct 31, 2019

Continue implementation of #664, addressing the followings:

  • Add special care for javax.jms.TemporaryQueue/Topic and Tibco temp queues/topic
  • Capture message bodies of text Messages
    • Rely on the existing ELASTIC_APM_CAPTURE_BODY agent config option.
    • Send as context.message.body
    • Limit size to 10000 characters. If longer than this size, trim to 9999 and append with ellipsis
  • Disable instrumentation (message tagging) for specific queues/topics as suggested in Should add support for instrumenting the listeners with parameter as subTypes of javax.jms.Message (i.e. javax.jms.MapMessage) #710
  • Capture predefined message headers and all properties
    • Rely on the existing ELASTIC_APM_CAPTURE_HEADERS agent config option.
    • Send as context.message.headers
    • Sanitize sensitive headers/properties based on the sanitize_field_names config option

Checklist

@eyalkoren eyalkoren requested a review from felixbarny October 31, 2019 10:27
@eyalkoren eyalkoren changed the title Jms add info JMS - some more enhancements Oct 31, 2019
@codecov-io
Copy link

codecov-io commented Oct 31, 2019

Codecov Report

Merging #911 into master will decrease coverage by 0.53%.
The diff coverage is 0%.

Impacted file tree graph

@@ Coverage Diff @@ ## master #911 +/- ## ============================================ - Coverage 65.52% 64.99% -0.54%  + Complexity 266 106 -160  ============================================ Files 244 245 +1 Lines 10559 10850 +291 Branches 1417 1499 +82 ============================================ + Hits 6919 7052 +133  - Misses 3245 3397 +152  - Partials 395 401 +6
Impacted Files Coverage Δ Complexity Δ
...t/v5_6/ElasticsearchClientSyncInstrumentation.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...sticsearchRestClientInstrumentationHelperImpl.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...m/agent/es/restclient/ResponseListenerWrapper.java 0% <ø> (ø) 0 <0> (ø) ⬇️
.../agent/mongoclient/MongoClientInstrumentation.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...lastic/apm/agent/mongoclient/ConnectionAdvice.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...m/agent/mongoclient/ConnectionInstrumentation.java 0% <0%> (ø) 0 <0> (ø) ⬇️
.../mongoclient/ConnectionCommandInstrumentation.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...astic/apm/agent/bci/ElasticApmInstrumentation.java 58.82% <0%> (-9.04%) 0 <0> (ø)
...m/agent/jms/JmsMessageConsumerInstrumentation.java 16.4% <0%> (-1.31%) 0% <0%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed6d0ea...b59bf61. Read the comment docs.

Copy link
Member

@felixbarny felixbarny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the changes look good I don't understand the whole context or background. Some explanations on a package-info.java would be useful I think 🙂

In general, it would make it a bit easier to follow is if there are multiple smaller PRs which a more narrow scope and links to issues/discuss where the requirements come from. But no need to refactor this particular PR, just as a general guideline.

Also, is there anything you want to add in the changelog?

@eyalkoren
Copy link
Contributor Author

I totally agree with everything 🙂 - it should have been few small PRs. Because they are dependent on each other, I didn't want to block on waiting for review/approval, but probably the wrong call.
I will add more documentation in code. I hoped the PR main comment would provide the context. I assume everything in this comment will go into changelog (which I always do last, to reduce merges 😊 )

@eyalkoren eyalkoren merged commit 491da9d into elastic:master Nov 19, 2019
@eyalkoren eyalkoren deleted the jms-add-info branch November 19, 2019 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants