Skip to content

Commit

Permalink
chore: the default network port for OTLP/HTTP is 4318 (#7007)
Browse files Browse the repository at this point in the history
Co-authored-by: soulbird <zhaothree@gmail.com>
  • Loading branch information
2 people authored and spacewander committed Jun 30, 2022
1 parent d30f77e commit dbf2334
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
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 @@ -435,7 +435,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

0 comments on commit dbf2334

Please sign in to comment.