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

change(opentelemetry): the default network port for OTLP/HTTP is changed to 4318 #7007

Merged
merged 1 commit into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apisix/plugins/opentelemetry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ local attr_schema = {
type = "object",
description = "opentelemetry collector",
properties = {
address = {type = "string", description = "host:port", default = "127.0.0.1:4317"},
address = {type = "string", description = "host:port", default = "127.0.0.1:4318"},
request_timeout = {type = "integer", description = "second uint", default = 3},
request_headers = {
type = "object",
Expand All @@ -82,7 +82,7 @@ local attr_schema = {
},
}
},
default = {address = "127.0.0.1:4317", request_timeout = 3}
default = {address = "127.0.0.1:4318", request_timeout = 3}
},
batch_span_processor = {
type = "object",
Expand Down
2 changes: 1 addition & 1 deletion conf/config-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ plugin_attr:
resource:
service.name: APISIX
collector:
address: 127.0.0.1:4317
address: 127.0.0.1:4318
request_timeout: 3
request_headers:
Authorization: token
Expand Down
6 changes: 3 additions & 3 deletions docs/en/latest/plugins/opentelemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ You can set the collecting by specifying the configuration in `conf/config.yaml`
| ------------ | ------ | -------- | ----------------------------------------------------- |
| trace_id_source | enum | random | the source of trace id, the valid value is `random` or `x-request-id`. If `x-request-id` is set, the value of `x-request-id` request header will be used as trace id. Please make sure it match regex pattern `[0-9a-f]{32}` |
| resource | object | | additional [resource](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md) append to trace |
| collector | object | {address = "127.0.0.1:4317", request_timeout = 3} | otlp collector |
| collector.address | string | 127.0.0.1:4317 | collector address |
| collector | object | {address = "127.0.0.1:4318", request_timeout = 3} | otlp collector |
| collector.address | string | 127.0.0.1:4318 | collector address |
| collector.request_timeout | integer | 3 | report request timeout(second) |
| collector.request_headers | object | | report request http headers |
| batch_span_processor | object | | trace span processor |
Expand All @@ -110,7 +110,7 @@ plugin_attr:
service.name: APISIX
tenant.id: business_id
collector:
address: 192.168.8.211:4317
address: 192.168.8.211:4318
request_timeout: 3
request_headers:
foo: bar
Expand Down
6 changes: 3 additions & 3 deletions docs/zh/latest/plugins/opentelemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f1
| ------------ | ------ | -------- | ----------------------------------------------------- |
| trace_id_source | enum | random | 合法的取值:`random` 或 `x-request-id`,允许使用当前请求 ID 代替随机 ID 作为新的 TraceID,必须确保当前请求 ID 是符合 TraceID 规范的:`[0-9a-f]{32}` |
| resource | object | | 追加到 trace 的额外 [resource](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md) |
| collector | object | {address = "127.0.0.1:4317", request_timeout = 3} | 数据采集服务 |
| collector.address | string | 127.0.0.1:4317 | 数据采集服务地址 |
| collector | object | {address = "127.0.0.1:4318", request_timeout = 3} | 数据采集服务 |
| collector.address | string | 127.0.0.1:4318 | 数据采集服务地址 |
| collector.request_timeout | integer | 3 | 数据采集服务上报请求超时时长,单位秒 |
| collector.request_headers | object | | 数据采集服务上报请求附加的 HTTP 请求头 |
| batch_span_processor | object | | trace span 处理器参数配置 |
Expand All @@ -108,7 +108,7 @@ plugin_attr:
service.name: APISIX
tenant.id: business_id
collector:
address: 192.168.8.211:4317
address: 192.168.8.211:4318
request_timeout: 3
request_headers:
foo: bar
Expand Down