newrelic / newrelic/newrelic-java-agent

AWS utilization updates

Open
#2,906 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

medium spec-change
Dominant language
Java
Stars
240
Forks
170
Avg merge
3d 2h
Merged PRs (30d)
21

Description

We've noticed that the AWS utilization class can fail silently in some situations. Specifically if the retrieved token is wither null or empty. See code link below. Would it be prudent to add a log message here to identify that? Or is this expected when not using AWS?
https://github.com/newrelic/newrelic-java-agent/blob/ddacac5f2242d25a7eab37c5563c9db0bf19ad3b/newrelic-agent/src/main/java/com/newrelic/agent/utilization/AWS.java#L59

Also, hitting the INSTANCE_DOCUMENT_URL (http://169.254.169.254/2016-09-02/dynamic/instance-identity/document) doesn't seem to always require valid tokens. Should we try that as a backup when we fail to get a token? If so, should the agent spec be updated?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in newrelic-agent/src/main/java/com/newrelic/agent/utilization/AWS.java around line 59 and trace how null or empty tokens are handled. Review the AWS INSTANCE_DOCUMENT_URL behavior and the agent specification before deciding whether logging or a fallback is expected. Done means the expected behavior is agreed and documented with coverage for the chosen path.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.