Skip to content

Improve emitter send data log - #343

Merged
wangzlei merged 2 commits into
aws:masterfrom
Kurru:improve-emitter-sendData-log
Jul 26, 2022
Merged

Improve emitter send data log#343
wangzlei merged 2 commits into
aws:masterfrom
Kurru:improve-emitter-sendData-log

Conversation

@Kurru

@Kurru Kurru commented Jul 22, 2022

Copy link
Copy Markdown
Contributor

Issue #, if available:
#26

Description of changes:
Improve the emitter sendData failure log message to include the number of bytes involved and the type of entity that failed to be published.

New log message has format:

Exception while sending segment (SegmentImpl) over UDP for entity CoreApi [1827010d1fe3a482] on segment [no parent segment]. Bytes: 77861

This code semi-frequently publishes a semi-meaningless stack trace java.net.SocketException: Message too long when the UDP packet to the daemon server is too large.

Exception while sending segment over UDP for entity CoreApi [3c2c14f28ed556d9] on segment [no parent segment]
java.net.SocketException: Message too long
at sun.nio.ch.DatagramChannelImpl.send0(Native Method) ~[?:?]
...
at sun.nio.ch.DatagramSocketAdaptor.send(DatagramSocketAdaptor.java:218) ~[?:?]
at java.net.DatagramSocket.send(DatagramSocket.java:664) ~[?:?]
at com.amazonaws.xray.emitters.UDPEmitter.sendData(UDPEmitter.java:116) ~[aws-xray-recorder-sdk-core-2.11.2.jar:?]
at com.amazonaws.xray.emitters.UDPEmitter.sendSegment(UDPEmitter.java:85) ~[aws-xray-recorder-sdk-core-2.11.2.jar:?]
at com.amazonaws.xray.AWSXRayRecorder.sendSegment(AWSXRayRecorder.java:195) ~[aws-xray-recorder-sdk-core-2.11.2.jar:?]
at com.amazonaws.xray.AWSXRayRecorder.endSubsegment(AWSXRayRecorder.java:588) ~[aws-xray-recorder-sdk-core-2.11.2.jar:?]
at com.amazonaws.xray.AWSXRay.endSubsegment(AWSXRay.java:129)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Kurru added 2 commits July 21, 2022 23:21
…r of bytes involved and the type of entity that failed to be published.

New log message has format:

Exception while sending segment (SegmentImpl) over UDP for entity CoreApi [1827010d1fe3a482] on segment [no parent segment]. Bytes: 77861
…r of bytes involved and the type of entity that failed to be published.

New log message has format:

Exception while sending segment (SegmentImpl) over UDP for entity CoreApi [1827010d1fe3a482] on segment [no parent segment]. Bytes: 77861
@Kurru
Kurru requested a review from a team as a code owner July 22, 2022 06:28
@codecov-commenter

codecov-commenter commented Jul 23, 2022

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.95%. Comparing base (7e7d732) to head (7828a69).
⚠️ Report is 74 commits behind head on master.

Files with missing lines Patch % Lines
...n/java/com/amazonaws/xray/emitters/UDPEmitter.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #343      +/-   ##
============================================
- Coverage     58.96%   58.95%   -0.02%     
  Complexity     1207     1207              
============================================
  Files           131      131              
  Lines          5064     5065       +1     
  Branches        592      592              
============================================
  Hits           2986     2986              
- Misses         1805     1806       +1     
  Partials        273      273              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wangzlei
wangzlei merged commit 6f29232 into aws:master Jul 26, 2022
@Kurru
Kurru deleted the improve-emitter-sendData-log branch July 26, 2022 23:29
@Kurru
Kurru restored the improve-emitter-sendData-log branch July 26, 2022 23:33
@Kurru
Kurru deleted the improve-emitter-sendData-log branch July 26, 2022 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants