Skip to content

log readonly msg errors only in debug#1715

Merged
SylvainJuge merged 8 commits intoelastic:masterfrom
SylvainJuge:silence-jms-readonly-msg
Mar 30, 2021
Merged

log readonly msg errors only in debug#1715
SylvainJuge merged 8 commits intoelastic:masterfrom
SylvainJuge:silence-jms-readonly-msg

Conversation

@SylvainJuge
Copy link
Member

@SylvainJuge SylvainJuge commented Mar 25, 2021

What does this PR do?

Some JMS implementations might use read-only messages during processing, which throws MessageNotWriteableException when the agent tries to write context-propagation headers to it.

This change allows to log those only at debug level, which leaves the default logging level uncluttered with those irrelevant log messages.

Checklist

  • This is a bugfix
@SylvainJuge SylvainJuge requested a review from eyalkoren March 25, 2021 08:58
@SylvainJuge SylvainJuge self-assigned this Mar 25, 2021
@ghost
Copy link

ghost commented Mar 25, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #1715 updated

  • Start Time: 2021-03-30T08:32:20.220+0000

  • Duration: 50 min 11 sec

  • Commit: 6c4d152

Test stats 🧪

Test Results
Failed 0
Passed 1915
Skipped 19
Total 1934

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 1915
Skipped 19
Total 1934

@codecov-io
Copy link

codecov-io commented Mar 25, 2021

Codecov Report

Merging #1715 (0ab7139) into master (1745351) will decrease coverage by 8.13%.
The diff coverage is 50.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1715      +/-   ##
============================================
- Coverage     69.42%   61.28%   -8.14%     
- Complexity     2789     3620     +831     
============================================
  Files           291      401     +110     
  Lines         12413    18248    +5835     
  Branches       1616     2507     +891     
============================================
+ Hits           8618    11184    +2566     
- Misses         3214     6281    +3067     
- Partials        581      783     +202     
Impacted Files Coverage Δ Complexity Δ
...stic/apm/agent/jms/JmsMessagePropertyAccessor.java 79.16% <50.00%> (ø) 7.00 <0.00> (?)
...o/elastic/apm/agent/mdc/MdcActivationListener.java 82.05% <0.00%> (ø) 16.00% <0.00%> (?%)
...ent/servlet/helper/ServletRequestHeaderGetter.java 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
.../apm/agent/servlet/FilterChainInstrumentation.java 100.00% <0.00%> (ø) 5.00% <0.00%> (?%)
...m/agent/profiler/collections/Long2LongHashMap.java 20.37% <0.00%> (ø) 17.00% <0.00%> (?%)
.../agent/rabbitmq/SpringAmqpTransactionNameUtil.java 60.00% <0.00%> (ø) 3.00% <0.00%> (?%)
...t/urlconnection/UrlConnectionPropertyAccessor.java 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
...co/elastic/apm/agent/profiler/SystemNanoClock.java 100.00% <0.00%> (ø) 2.00% <0.00%> (?%)
...servlet/RequestStreamRecordingInstrumentation.java 37.50% <0.00%> (ø) 6.00% <0.00%> (?%)
...gent/rabbitmq/header/RabbitMQTextHeaderSetter.java 100.00% <0.00%> (ø) 2.00% <0.00%> (?%)
... and 101 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 1745351...0ab7139. Read the comment docs.

@SylvainJuge SylvainJuge merged commit a677364 into elastic:master Mar 30, 2021
@SylvainJuge SylvainJuge deleted the silence-jms-readonly-msg branch March 30, 2021 09:42
v1v added a commit to v1v/apm-agent-java that referenced this pull request Apr 7, 2021
…va into feature/java-stable-tag

* 'feature/java-stable-tag' of github.com:v1v/apm-agent-java: (534 commits)
  Added Support for JBoss Logging to the log correlation plugin (elastic#1737)
  Removing improper RabbitMQ reference from instrumentation class (elastic#1745)
  Loading Advice classes lazily when required (elastic#1736)
  add support for ibm JVMs (elastic#1739)
  Adds circuit breaker to app deployment in load pipeline (elastic#1731)
  Bump json-schema-validator from 1.0.50 to 1.0.51 (elastic#1732)
  Bump java-driver-core from 4.10.0 to 4.11.0 (elastic#1733)
  Cassandra instrumentation (elastic#1712)
  Build apm-agent-attach-cli before application-server-integration-tests (elastic#1729)
  Fix thread pool method matchers (elastic#1717)
  Always use English locale when formatting doubles (elastic#1727) (elastic#1728)
  feat: grab locust metrics on load tests (elastic#1724)
  log readonly msg errors only in debug (elastic#1715)
  feat: use metricbeat to grab host metrics (elastic#1718)
  Eliminate log4j shaders dependency in slf4j (elastic#1723)
  Fix log correlation for log4j2 (elastic#1720)
  Allowing more time for the test
  Bump json-schema-validator from 1.0.49 to 1.0.50 (elastic#1711)
  Fix master build and print URL on connection error
  Attacher improvements (elastic#1667)
  ...
SylvainJuge added a commit that referenced this pull request Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

5 participants