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

Synthetics-Info Header Causing NPE #1689

Closed
deleonenriqueta opened this issue Jan 17, 2024 · 1 comment
Closed

Synthetics-Info Header Causing NPE #1689

deleonenriqueta opened this issue Jan 17, 2024 · 1 comment
Assignees
Labels
bug Something isn't working as designed/intended

Comments

@deleonenriqueta
Copy link
Contributor

Description

When a synthetics request is sent, the request contains an X-NewRelic-Synthetics header, but the agent is expecting both the X-NewRelic-Synthetics header and the X-NewRelic-Synthetics-Info header. When an X-NewRelic-Synthetics-Info header is not a part of the request, null values are added to the InboundHeaderState where information from the X-NewRelic-Synthetics-Info would have been. The agent is then trying to add those null attributes from the InboundHeaderState to the intrinsic attributes of transactions. This is causing the NullPointerException.

Acceptance Criteria

  1. Add null checks to prevent NPE's when adding attributes from the InboundHeaderState to transaction intrinsic attributes in Transaction.java:
    image

  2. Add a null check to prevent unnecessary parsing of X-NewRelic-Synthetics-Info in InboundHeaderState.java:
    image

@deleonenriqueta deleonenriqueta added the bug Something isn't working as designed/intended label Jan 17, 2024
@workato-integration
Copy link

https://new-relic.atlassian.net/browse/NR-215939

@deleonenriqueta deleonenriqueta self-assigned this Jan 17, 2024
@deleonenriqueta deleonenriqueta moved this from Triage to In progress in Java Engineering Board Jan 17, 2024
@deleonenriqueta deleonenriqueta moved this from In progress to Needs Review in Java Engineering Board Jan 17, 2024
@github-project-automation github-project-automation bot moved this from Needs Review to Code Complete/Done in Java Engineering Board Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as designed/intended
Projects
Archived in project
Development

No branches or pull requests

1 participant