Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
skywalking-nginx-lua
提交
13363d2d
S
skywalking-nginx-lua
项目概览
apache
/
skywalking-nginx-lua
通知
39
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
skywalking-nginx-lua
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
13363d2d
编写于
2月 23, 2020
作者:
wu-sheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix test cases and use the upstream register URIs.
上级
7eddd334
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
4 deletion
+6
-4
examples/nginx.conf
examples/nginx.conf
+2
-2
lib/skywalking/client.lua
lib/skywalking/client.lua
+2
-2
lib/skywalking/span_test.lua
lib/skywalking/span_test.lua
+2
-0
未找到文件。
examples/nginx.conf
浏览文件 @
13363d2d
...
...
@@ -145,7 +145,7 @@ http {
# ------------------------------------------------------
# -- Mock OAP server to provide register and trace collection
# ------------------------------------------------------
location
/
skywalking/register/service
{
location
/
v2/service/register
{
default_type
text/html
;
lua_need_request_body
on
;
...
...
@@ -161,7 +161,7 @@ http {
}
}
location
/
skywalking/register/serviceInstance
{
location
/
v2/instance/register
{
default_type
text/html
;
lua_need_request_body
on
;
...
...
lib/skywalking/client.lua
浏览文件 @
13363d2d
...
...
@@ -76,7 +76,7 @@ function Client:registerService(metadata_buffer, backend_http_uri)
local
http
=
require
(
'resty.http'
)
local
httpc
=
http
.
new
()
local
res
,
err
=
httpc
:
request_uri
(
backend_http_uri
..
'/
register/service
'
,
{
local
res
,
err
=
httpc
:
request_uri
(
backend_http_uri
..
'/
v2/service/register
'
,
{
method
=
"POST"
,
body
=
serviceRegisterParam
,
headers
=
{
...
...
@@ -115,7 +115,7 @@ function Client:registerServiceInstance(metadata_buffer, backend_http_uri)
local
http
=
require
(
'resty.http'
)
local
httpc
=
http
.
new
()
local
res
,
err
=
httpc
:
request_uri
(
backend_http_uri
..
'/
register/serviceInstance
'
,
{
local
res
,
err
=
httpc
:
request_uri
(
backend_http_uri
..
'/
v2/instance/register
'
,
{
method
=
"POST"
,
body
=
serviceInstanceRegisterParam
,
headers
=
{
...
...
lib/skywalking/span_test.lua
浏览文件 @
13363d2d
...
...
@@ -93,6 +93,8 @@ TestSpan = {}
local
span2
=
Span
:
new
(
"operation_name"
,
context
,
span1
)
lu
.
assertEquals
(
span2
.
parent_span_id
,
0
)
lu
.
assertEquals
(
span2
.
span_id
,
1
)
lu
.
assertNil
(
span2
.
start_time
)
span2
:
start
(
123456
)
lu
.
assertNotNil
(
span2
.
start_time
)
-- Use new context to check again
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录