feat:Remove error log from `DecodeTransferMetadataReactiveFilter`. (#991)

pull/1000/head
Haotian Zhang 2 years ago committed by GitHub
parent 4fcff95f7b
commit 97f5ec54d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,4 +2,5 @@
---
- [feature: support reactive discovery client health indicator.](https://github.com/Tencent/spring-cloud-tencent/pull/988)
- [feature: Enhance default configuration to support `application*.yaml` and `bootstrap*.yaml`.](https://github.com/Tencent/spring-cloud-tencent/pull/988)
- [feature: Enhance default configuration to support `application*.yaml` and `bootstrap*.yaml`.](https://github.com/Tencent/spring-cloud-tencent/pull/988)
- [feat:Remove error log from `DecodeTransferMetadataReactiveFilter`.](https://github.com/Tencent/spring-cloud-tencent/pull/991)

@ -21,7 +21,8 @@ README:
## 介绍
Spring Cloud Tencent 是基于 Spring Cloud SPI 实现的一站式微服务解决方案。通过集成 Spring Cloud 和腾讯中间件,让分布式服务和微服务的开发、测试、发布和运维变得更加简单。
Spring Cloud Tencent 是基于 Spring Cloud SPI 实现的一站式微服务解决方案。通过集成 Spring Cloud
和腾讯中间件,让分布式服务和微服务的开发、测试、发布和运维变得更加简单。
<img src="https://user-images.githubusercontent.com/4991116/170412323-ecaf544c-1d7b-45db-9cf0-591544e50c64.png" width="80%" />
@ -31,7 +32,7 @@ Spring Cloud Tencent 集成 Spring Cloud 和北极星。北极星是一个支持
- [北极星 Github](https://github.com/polarismesh/polaris)
Spring Cloud 集成北极星可以解决以下问题:
Spring Cloud 集成北极星可以解决以下问题:
- 服务管理:服务发现、服务发现、健康检查
- 流量控制:可自定义的流量路由、负载均衡、限频限流、访问控制
@ -98,10 +99,10 @@ Spring Cloud Tencent 所有组件都已上传到 Maven 中央仓库,只需要
北极星为开发者提供体验环境:
- [北极星控制台](http://14.116.241.63:8080)
- 北极星服务端地址:`grpc://183.47.111.80:8091`
- [北极星控制台](http://14.22.2.220:80)
- 北极星服务端地址:`grpc://14.22.2.171:8091`
在 spring-cloud-tencent-example 项目里,北极星服务端地址默认配置为`grpc://183.47.111.80:8091`。
在 spring-cloud-tencent-example 项目里,北极星服务端地址默认配置为`grpc://14.22.2.171:8091`。
## 交流群

@ -21,17 +21,19 @@ Visit [Wiki](https://github.com/Tencent/spring-cloud-tencent/wiki) to learn more
## Introduction
Spring Cloud Tencent is an one-stop microservice solution which implements the standard Spring Cloud SPI. It integrates Spring Cloud with Tencent middlewares and makes it easy to develop microservice.
Spring Cloud Tencent is an one-stop microservice solution which implements the standard Spring Cloud SPI. It integrates
Spring Cloud with Tencent middlewares and makes it easy to develop microservice.
<img src="https://user-images.githubusercontent.com/4991116/170412596-692f8dae-42f7-495f-a451-01396e381eb0.png" width="80%" />
**Service discovery and governance**
Spring Cloud Tencent integrates Spring Cloud with Polaris which is an open source system for service discovery and governance.
Spring Cloud Tencent integrates Spring Cloud with Polaris which is an open source system for service discovery and
governance.
- [Polaris Github](https://github.com/polarismesh/polaris)
Spring Cloud with Polaris can solve these problem:
Spring Cloud with Polaris can solve these problem:
- service management: service discovery, service registry and health check
- traffic control: customizable routing, load balance, rate limiting and access control
@ -99,10 +101,10 @@ For example:
The experience environment of Polaris is provided for developers:
- [Polaris Console](http://14.116.241.63:8080)
- Polaris Server Address: `grpc://183.47.111.80:8091`
- [Polaris Console](http://14.22.2.220:80)
- Polaris Server Address: `grpc://14.22.2.171:8091`
The address of Polaris server in spring-cloud-tencent-example is `grpc://183.47.111.80:8091` by default.
The address of Polaris server in spring-cloud-tencent-example is `grpc://14.22.2.171:8091` by default.
## Chat Group

@ -81,8 +81,6 @@ public class DecodeTransferMetadataReactiveFilter implements WebFilter, Ordered
TransHeadersTransfer.transfer(serverHttpRequest);
return webFilterChain.filter(serverWebExchange)
.doOnError(throwable -> LOG.error("handle metadata[{}] error.",
MetadataContextHolder.get(), throwable))
.doFinally((type) -> MetadataContextHolder.remove());
}

@ -69,7 +69,7 @@ public class PolarisRegistration implements Registration {
private Map<String, String> metadata;
private String host;
private final String host;
private int port;
@ -133,10 +133,6 @@ public class PolarisRegistration implements Registration {
return port;
}
protected void setPort(int port) {
this.port = port;
}
@Override
public boolean isSecure() {
return StringUtils.equalsIgnoreCase(polarisDiscoveryProperties.getProtocol(), "https");

@ -73,7 +73,7 @@
<revision>1.12.0-2022.0.1-SNAPSHOT</revision>
<!-- Dependencies -->
<polaris.version>1.12.0</polaris.version>
<polaris.version>1.12.3</polaris.version>
<guava.version>31.1-jre</guava.version>
<mocktio.version>4.9.0</mocktio.version>
<byte-buddy.version>1.12.19</byte-buddy.version>

@ -5,7 +5,7 @@ spring:
name: MetadataBackendService
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
discovery:

@ -5,7 +5,7 @@ spring:
name: MetadataFrontendService
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
discovery:

@ -5,7 +5,7 @@ spring:
name: MetadataMiddleService
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
discovery:

@ -5,7 +5,7 @@ spring:
name: NacosCalleeService
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
stat:

@ -5,7 +5,7 @@ spring:
name: NacosCalleeService
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
stat:

@ -5,7 +5,7 @@ spring:
name: NacosCallerService
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
loadbalancer:

@ -5,7 +5,7 @@ spring:
name: polaris-circuitbreaker-callee-service
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
stat:

@ -5,7 +5,7 @@ spring:
name: polaris-circuitbreaker-callee-service
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
stat:

@ -8,7 +8,7 @@ spring:
circuitbreaker:
enabled: true
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
loadbalancer:

@ -16,7 +16,7 @@ spring:
feature-env:
enabled: true
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
gateway:
@ -36,7 +36,7 @@ spring:
name: CircuitBreaker
args:
# statusCodes 缺省时会自动识别 "5**" 为错误
# statusCodes: '''404,5**'''
# statusCodes: '''404,5**'''
# fallbackUri 缺省时会在熔断触发后拉取 plaris server 配置的降级作为 response
fallbackUri: '''forward:/polaris-fallback'''
# routes:

@ -5,7 +5,7 @@ spring:
name: polaris-circuitbreaker-resttemplate-example
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
loadbalancer:

@ -5,7 +5,7 @@ spring:
name: polaris-circuitbreaker-webclient-example
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
loadbalancer:

@ -5,7 +5,7 @@ spring:
name: polaris-config-data-example
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
config:
auto-refresh: true # auto refresh when config file changed

@ -7,12 +7,12 @@ spring:
active: abc
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
config:
auto-refresh: true # auto refresh when config file changed
# data-source: local # config data source default is polaris.
# local-file-root-path: # set root path for reading config file, when in local data source
# data-source: local # config data source default is polaris.
# local-file-root-path: # set root path for reading config file, when in local data source
groups:
- name: ${spring.application.name} # group name
files: [ "config/application.properties", "config/bootstrap.yml" ] # config/application.properties takes precedence over config/bootstrap.yml

@ -5,7 +5,7 @@ spring:
name: DiscoveryCalleeService
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
discovery:

@ -13,7 +13,7 @@ spring:
reporter:
enabled: true
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
discovery:

@ -10,5 +10,5 @@ spring:
content:
env: blue
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default

@ -10,5 +10,5 @@ spring:
content:
env: green
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default

@ -21,7 +21,7 @@ spring:
transitive:
- a
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
gateway:

@ -5,7 +5,7 @@ spring:
name: RateLimitCalleeService
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
ratelimit:

@ -9,6 +9,6 @@ spring:
content:
label1: value1
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true

@ -9,6 +9,6 @@ spring:
content:
label1: value2
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true

@ -12,7 +12,7 @@ spring:
reporter:
enabled: true
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
loadbalancer:

@ -26,7 +26,7 @@
应用默认指向北极星官方的体验环境,启动成功后可直接到体验站点查看服务注册数据。
- 管控台地址: http://14.116.241.63:8080/
- 管控台地址: http://14.22.2.220:80/
- 账号polaris
- 密码polaris
@ -84,7 +84,7 @@ featureenv-front-example[feature2] -> featureenv-middle-example[base] -> feature
**配置染色规则**
配置地址http://14.116.241.63:8080/#/filegroup-detail?group=featureenv-gateway&namespace=default
配置地址http://14.22.2.220:80/#/filegroup-detail?group=featureenv-gateway&namespace=default
修改 rule/staining.json 配置文件,填写以下规则:

@ -31,7 +31,7 @@ directly.
By default, the applications point to the official Polaris experience environment, and you can directly view the service
registration data at the experience site after a successful launch.
- Console address: http://14.116.241.63:8080/
- Console address: http://14.22.2.220:80/
- Account: polaris
- Password: polaris
@ -89,7 +89,7 @@ Simulate a real-world scenario, assuming that the client request has a uid reque
**Configure coloring rules**
Polaris Configuration Address: http://14.116.241.63:8080/#/filegroup-detail?group=featureenv-gateway&namespace=default
Polaris Configuration Address: http://14.22.2.220:80/#/filegroup-detail?group=featureenv-gateway&namespace=default
Modify the `rule/staining.json` configuration file and fill in the following rule:

@ -6,7 +6,7 @@ spring:
name: featureenv-backend-example
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
logging:

@ -6,7 +6,7 @@ spring:
name: featureenv-front-example
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
logging:

@ -6,7 +6,7 @@ spring:
name: featureenv-middle-example
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
logging:

@ -6,7 +6,7 @@ spring:
name: featureenv-backend-example
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
tencent:

@ -6,7 +6,7 @@ spring:
name: featureenv-middle-example
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
tencent:

@ -6,7 +6,7 @@ spring:
name: featureenv-backend-example
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
tencent:

@ -6,7 +6,7 @@ spring:
name: featureenv-front-example
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
tencent:

@ -7,7 +7,7 @@ spring:
cloud:
tencent:
plugin:
scg:
scg:
staining:
enabled: true
rule-staining:
@ -16,7 +16,7 @@ spring:
feature-env:
enabled: true
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
gateway:

@ -6,7 +6,7 @@ spring:
name: gray-release-back
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
logging:

@ -6,7 +6,7 @@ spring:
name: gray-release-front
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
logging:

@ -6,7 +6,7 @@ spring:
name: gray-release-gateway
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
logging:

@ -6,7 +6,7 @@ spring:
name: gray-release-middle
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
logging:

@ -5,14 +5,14 @@ spring:
name: QuickstartCalleeService
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
discovery:
enabled: true
register: true
config:
address: grpc://183.47.111.80:8093
address: grpc://14.22.2.171:8093
auto-refresh: true
groups:
- name: ${spring.application.name}

@ -5,14 +5,14 @@ spring:
name: QuickstartCalleeService
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
discovery:
enabled: true
register: true
config:
address: grpc://183.47.111.80:8093
address: grpc://14.22.2.171:8093
auto-refresh: true
groups:
- name: ${spring.application.name}

@ -5,7 +5,7 @@ spring:
name: QuickstartCallerService
cloud:
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
discovery:

@ -15,7 +15,7 @@ spring:
feature-env:
enabled: true
polaris:
address: grpc://183.47.111.80:8091
address: grpc://14.22.2.171:8091
namespace: default
enabled: true
gateway:

@ -58,5 +58,6 @@ public class PolarisContextGetHostTest {
assertThat(polarisContextProperties.getEnabled()).isTrue();
assertThat(polarisContextProperties.getNamespace()).isEqualTo("dev");
assertThat(polarisContextProperties.getService()).isEqualTo("TestApp");
assertThat(polarisContextProperties.getLocalPort()).isEqualTo(9090);
}
}

@ -6,3 +6,4 @@ spring:
namespace: dev
service: TestApp
enabled: true
local-port: 9090

Loading…
Cancel
Save