You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "shreemaan-abhishek (via GitHub)" <gi...@apache.org> on 2023/05/03 09:44:09 UTC
[GitHub] [apisix] shreemaan-abhishek opened a new pull request, #9401: fix: support $hostname in skywalking service_instance_name
shreemaan-abhishek opened a new pull request, #9401:
URL: https://github.com/apache/apisix/pull/9401
### Description
Fixes #7977
### Checklist
- [ ] I have explained the need for this PR and the problem it solves
- [ ] I have explained the changes or the new features added to this PR
- [ ] I have added tests corresponding to this change
- [ ] I have updated the documentation to reflect this change
- [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
<!--
Note
1. Mark the PR as draft until it's ready to be reviewed.
2. Always add/update tests for any changes unless you have a good reason.
3. Always update the documentation to reflect the changes made in the PR.
4. Make a new commit to resolve conversations instead of `push -f`.
5. To resolve merge conflicts, merge master instead of rebasing.
6. Use "request review" to notify the reviewer after making changes.
7. Only a reviewer can mark a conversation as resolved.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 commented on pull request #9401: fix: support $hostname in skywalking service_instance_name
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on PR #9401:
URL: https://github.com/apache/apisix/pull/9401#issuecomment-1541123868
It looks like just a pick from other branch: https://github.com/apache/apisix/pull/7252
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Sn0rt commented on pull request #9401: fix: support $hostname in skywalking service_instance_name
Posted by "Sn0rt (via GitHub)" <gi...@apache.org>.
Sn0rt commented on PR #9401:
URL: https://github.com/apache/apisix/pull/9401#issuecomment-1539444747
LGTM
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] leslie-tsang commented on a diff in pull request #9401: fix(skywalking-logger, error-log-logger): support $hostname in skywalking service_instance_name
Posted by "leslie-tsang (via GitHub)" <gi...@apache.org>.
leslie-tsang commented on code in PR #9401:
URL: https://github.com/apache/apisix/pull/9401#discussion_r1197253381
##########
apisix/plugins/error-log-logger.lua:
##########
@@ -237,10 +237,15 @@ local function send_to_skywalking(log_message)
httpc:set_timeout(config.timeout * 1000)
local entries = {}
+ local service_instance_name = config.skywalking.service_instance_name
+ if service_instance_name == "$hostname" then
+ service_instance_name = core.utils.gethostname()
+ end
Review Comment:
@shreemaan-abhishek
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] monkeyDluffy6017 merged pull request #9401: fix(skywalking-logger, error-log-logger): support $hostname in skywalking service_instance_name
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 merged PR #9401:
URL: https://github.com/apache/apisix/pull/9401
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] shreemaan-abhishek commented on a diff in pull request #9401: fix(skywalking-logger, error-log-logger): support $hostname in skywalking service_instance_name
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on code in PR #9401:
URL: https://github.com/apache/apisix/pull/9401#discussion_r1201463382
##########
apisix/plugins/error-log-logger.lua:
##########
@@ -237,10 +237,15 @@ local function send_to_skywalking(log_message)
httpc:set_timeout(config.timeout * 1000)
local entries = {}
+ local service_instance_name = config.skywalking.service_instance_name
+ if service_instance_name == "$hostname" then
+ service_instance_name = core.utils.gethostname()
+ end
Review Comment:
added
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] shreemaan-abhishek commented on pull request #9401: fix: support $hostname in skywalking service_instance_name
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on PR #9401:
URL: https://github.com/apache/apisix/pull/9401#issuecomment-1541203324
> It looks like just a pick from other branch: #7252
@monkeyDluffy6017 Oh yes, it is. But that branch wasn't merged to master so this issue still exists.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] shreemaan-abhishek commented on a diff in pull request #9401: fix(skywalking-logger, error-log-logger): support $hostname in skywalking service_instance_name
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on code in PR #9401:
URL: https://github.com/apache/apisix/pull/9401#discussion_r1198026748
##########
apisix/plugins/error-log-logger.lua:
##########
@@ -237,10 +237,15 @@ local function send_to_skywalking(log_message)
httpc:set_timeout(config.timeout * 1000)
local entries = {}
+ local service_instance_name = config.skywalking.service_instance_name
+ if service_instance_name == "$hostname" then
+ service_instance_name = core.utils.gethostname()
+ end
Review Comment:
@leslie-tsang, isn't this sufficient 🤔
https://github.com/dickens7/apisix/blob/da3a8db37b84bc45c8edd98ac80be2c5a64a9d99/t/plugin/skywalking-logger.t#L239-L247
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] leslie-tsang commented on a diff in pull request #9401: fix(skywalking-logger, error-log-logger): support $hostname in skywalking service_instance_name
Posted by "leslie-tsang (via GitHub)" <gi...@apache.org>.
leslie-tsang commented on code in PR #9401:
URL: https://github.com/apache/apisix/pull/9401#discussion_r1199754825
##########
apisix/plugins/error-log-logger.lua:
##########
@@ -237,10 +237,15 @@ local function send_to_skywalking(log_message)
httpc:set_timeout(config.timeout * 1000)
local entries = {}
+ local service_instance_name = config.skywalking.service_instance_name
+ if service_instance_name == "$hostname" then
+ service_instance_name = core.utils.gethostname()
+ end
Review Comment:
We need a test case for `error-log-logger`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] leslie-tsang commented on a diff in pull request #9401: fix(skywalking-logger, error-log-logger): support $hostname in skywalking service_instance_name
Posted by "leslie-tsang (via GitHub)" <gi...@apache.org>.
leslie-tsang commented on code in PR #9401:
URL: https://github.com/apache/apisix/pull/9401#discussion_r1195861419
##########
apisix/plugins/error-log-logger.lua:
##########
@@ -237,10 +237,15 @@ local function send_to_skywalking(log_message)
httpc:set_timeout(config.timeout * 1000)
local entries = {}
+ local service_instance_name = config.skywalking.service_instance_name
+ if service_instance_name == "$hostname" then
+ service_instance_name = core.utils.gethostname()
+ end
Review Comment:
Hello there, we need a test case to ensure it work as expected. :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org