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

Don't add null port to hostname attribute on JFR events #2192

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jasonjkeller
Copy link
Contributor

@jasonjkeller jasonjkeller commented Jan 6, 2025

Fix for https://new-relic.atlassian.net/browse/NR-345540

It appears that if the Java agent cannot obtain the port associated with a host then it will set it to null, resulting in a host.hostname attribute with a value like 4326afc46b32:null being added to JFR events (where 4326afc46b32 is the hostname and null is the port number). This seems to be causing errors with GraphQL queries related to the Flame graph.

The approach that we follow with other agent data forms is to omit the port if it is null, so this PR follows that approach rather than setting a dummy port value.

@codecov-commenter
Copy link

codecov-commenter commented Jan 6, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 70.56%. Comparing base (13ad7f1) to head (a140bb6).

Files with missing lines Patch % Lines
...c/main/java/com/newrelic/agent/jfr/JfrService.java 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2192      +/-   ##
============================================
- Coverage     70.58%   70.56%   -0.02%     
+ Complexity     9975     9971       -4     
============================================
  Files           842      842              
  Lines         40367    40369       +2     
  Branches       6117     6118       +1     
============================================
- Hits          28494    28488       -6     
- Misses         9096     9099       +3     
- Partials       2777     2782       +5     

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

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.

5 participants