fix(skywalking-logger, error-log-logger): skywalking service_instance_name $hostname is supported#7252
Conversation
spacewander
left a comment
There was a problem hiding this comment.
Let's submit the PR to master, and backport it after it's merged
|
Can we add some test cases to cover the changes? |
I don't know how this test case can be written to cover this scenario. Shall we query the data received by skywaling? |
Just for reference: https://github.com/apache/apisix/blob/master/t/plugin/skywalking-logger.t#L124-L196. |
|
we can verify Line 108 in afce02c |
This won't work, because |
|
how about |
But I think my current use case should be ok, we just need to judge that service_instance_name is not equal to the string |
|
I reruned the failed CI and if CI passed, we can merge it. |
|
please rerun ci |
| local service_instance_name = config.skywalking.service_instance_name | ||
| if service_instance_name == "$hostname" then | ||
| service_instance_name = core.utils.gethostname() | ||
| end |
There was a problem hiding this comment.
Hello there, we need a test case to ensure it work as expected. :)
Description
Fixes #7251
Checklist