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

Update Realtime Profiling Instance Naming #256

Closed
wants to merge 5 commits into from

Conversation

deleonenriqueta
Copy link
Contributor

Resolves Issue #1864

@deleonenriqueta deleonenriqueta marked this pull request as ready for review June 6, 2024 19:45
Copy link
Contributor

@jtduffy jtduffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolve the duplicate test asserts and see what others think about the hostname config. 👍

assertEquals("test_app_name", attributes.asMap().get(SERVICE_NAME));
assertEquals("test_app_name", attributes.asMap().get(APP_NAME));
assertEquals("test_hostname", attributes.asMap().get(HOSTNAME));
assertEquals("test_app_name", attributes.asMap().get(APP_NAME));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks to be a dup of the asserts above (APP_NAME and SERVICE_NAME checks)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

assertEquals("test_app_name", attributes.asMap().get(SERVICE_NAME));
assertEquals("test_app_name", attributes.asMap().get(APP_NAME));
assertEquals("resolved_hostname", attributes.asMap().get(HOSTNAME));
assertEquals("test_app_name", attributes.asMap().get(APP_NAME));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dups

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

assertEquals("test_app_name", attributes.asMap().get(SERVICE_NAME));
assertEquals("test_app_name", attributes.asMap().get(APP_NAME));
assertEquals(loopbackAddress.toString(), attributes.asMap().get(HOSTNAME));
assertEquals("test_app_name", attributes.asMap().get(APP_NAME));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same duplication

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

hostname = InetAddress.getLocalHost().toString();
} catch (Throwable e) {
hostname = InetAddress.getLoopbackAddress().toString();
if (config.getHostname() == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about having hostname as a config. Probably be good to get other opinions on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking back, there is no real need to update the config. This value can be accessed and added to the commonAttributes from the Agent, without changing the config at all.

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.

2 participants