Skip to content
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

Improve emitter send data log #343

Merged
merged 2 commits into from
Jul 26, 2022

Conversation

Kurru
Copy link
Contributor

@Kurru Kurru commented Jul 22, 2022

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

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…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
Copy link

Codecov Report

Merging #343 (7828a69) into master (7e7d732) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@             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              
Impacted Files Coverage Δ
...n/java/com/amazonaws/xray/emitters/UDPEmitter.java 30.55% <0.00%> (-0.88%) ⬇️

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 7e7d732...7828a69. Read the comment docs.

@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.

None yet

3 participants