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

Improve goprofile plugin to support real local IP inclusion #1281

Merged
merged 5 commits into from
Dec 29, 2023

Conversation

EvanLjp
Copy link
Collaborator

@EvanLjp EvanLjp commented Dec 25, 2023

This commit addresses the limitation within the logtail profile schema regarding the inability to include the actual local IP address using the goprofile plugin. When profiling, the collection of non-specific host addresses (e.g., 127.0.0.1, localhost, or 0.0.0.0) leads to confusion over multiple target identification. To resolve this, the goprofile plugin has been enhanced to recognize and replace these generic addresses with the real local IP address of the machine.

Changes include:

  • Automatic substitution of custom label values that correspond to 127.0.0.1, localhost, or 0.0.0.0 with the machine's actual local IP address.

@EvanLjp EvanLjp added the enhancement Feature enhancement label Dec 25, 2023
@EvanLjp EvanLjp changed the title Convert localhost 2 real local ip Convert localhost hostname to real local ip address Dec 25, 2023
@EvanLjp EvanLjp requested a review from yyuuttaaoo December 25, 2023 12:58
Copy link
Collaborator

Choose a reason for hiding this comment

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

能否说明为什么要做这些转换?用途是什么

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sidecar 模式设置采集本地地址,倒是采集上来的profile 数据都是127.0.0.1 追加一个本地真实ip 标签

@EvanLjp EvanLjp changed the title Convert localhost hostname to real local ip address Enhance goprofile Plugin to Append Local IP Address Dec 28, 2023
@yyuuttaaoo yyuuttaaoo changed the title Enhance goprofile Plugin to Append Local IP Address Improve goprofile Plugin to Support Real Local IP Inclusion Dec 29, 2023
@yyuuttaaoo yyuuttaaoo changed the title Improve goprofile Plugin to Support Real Local IP Inclusion Improve goprofile plugin to support real local IP inclusion Dec 29, 2023
@yyuuttaaoo yyuuttaaoo merged commit 8b89fa2 into main Dec 29, 2023
21 checks passed
@yyuuttaaoo yyuuttaaoo deleted the convert-localhost2reallocalip branch December 29, 2023 06:40
@yyuuttaaoo yyuuttaaoo added this to the v2.0 milestone Jan 2, 2024
yyuuttaaoo pushed a commit that referenced this pull request Jan 2, 2024
This commit addresses the limitation within the logtail profile schema regarding the inability to include the actual local IP address using the goprofile plugin. When profiling, the collection of non-specific host addresses (e.g., 127.0.0.1, localhost, or 0.0.0.0) leads to confusion over multiple target identification. To resolve this, the goprofile plugin has been enhanced to recognize and replace these generic addresses with the real local IP address of the machine.

Changes include:

Automatic substitution of custom label values that correspond to 127.0.0.1, localhost, or 0.0.0.0 with the machine's actual local IP address.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants