Skip to content

Avoid setting hostname tag on local root span if empty#846

Merged
labbati merged 4 commits into
masterfrom
labbati/better-hostname
May 17, 2019
Merged

Avoid setting hostname tag on local root span if empty#846
labbati merged 4 commits into
masterfrom
labbati/better-hostname

Conversation

@labbati
Copy link
Copy Markdown
Member

@labbati labbati commented May 17, 2019

No description provided.

@labbati labbati requested review from mar-kolya and tylerbenson May 17, 2019 20:03

String hostname = "";
if (reportHostName) {
hostname = getHostname();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You may want to keep hostname vs hostName consistent :)


final Map<String, String> result =
newHashMap(reportHostName ? (runtimeTags.size() + 1) : runtimeTags.size());
newHashMap(hostNameIsValid ? (runtimeTags.size() + 1) : runtimeTags.size());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IMHO by now precalculating this becomes ridiculously complex we should consider dropping this - it's simply not worth the immeasurable savings in time/memory.

@labbati labbati merged commit 7989098 into master May 17, 2019
@tylerbenson tylerbenson deleted the labbati/better-hostname branch May 17, 2019 20:48
@tylerbenson tylerbenson added this to the 0.29.0 milestone May 29, 2019
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.

3 participants