Commit Graph

146 Commits

Author SHA1 Message Date
echooymxq 9cc52706f5 Polish code in Dubbo adapter and use Dubbo common constants (#1245) 2020-01-13 09:39:06 +08:00
Eric Zhao fe23d5c11f test: Improve test cases in sentinel-apache-dubbo-adapter module
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-12-25 11:54:19 +08:00
Eric Zhao 87142ce512 Bump version to 1.7.2-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-12-25 11:19:07 +08:00
Eric Zhao 9c909e3631 Bump version to 1.7.1
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-12-24 20:05:23 +08:00
Mr.Z 47100e64ba Improve async invocation support in sentinel-apache-dubbo-adapter (#1124)
* Improve async support for Dubbo 2.7.2 and above (not compatible with 2.7.0 and 2.7.1 due to the bad compatibility design of Dubbo Filter)
2019-12-23 17:45:48 +08:00
Eric Zhao 20ad3c8f79 Improve code and demo for sentinel-spring-webmvc-adapter module
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-11-27 17:46:59 +08:00
kaizi2009 b14534fb35 Add Sentinel Spring Web MVC adapter module (#1104)
- Add sentinel-spring-webmvc-adapter module and demo
2019-11-27 14:47:04 +08:00
Eric Zhao 9705f54611 Bump version to 1.7.1-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-11-12 11:08:14 +08:00
Eric Zhao 8cdf1de854 Bump version to 1.7.0
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-11-11 21:12:58 +08:00
Eric Zhao 275041403d Update resource classification in SentinelWebFluxFilter and improve reactor EntryConfig
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-11-11 19:31:48 +08:00
tao.zhang 73188b46b7 Fix the bug that the Zuul adapter does not exit the entry with parameters (#1148) 2019-11-08 22:27:59 +08:00
Eric Zhao d38d5484ef Remove redundant entry in Web servlet CommonFilter and update entry classification
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-11-06 21:00:08 +08:00
Eric Zhao 800f6b9d65 Update adapter modules to update corresponding resource classification
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-11-06 21:00:08 +08:00
Eric Zhao 086a6b0370 Support resource classification in Reactor adapter module and polish SC Gateway adapter
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-11-06 21:00:08 +08:00
Eric Zhao 9d514d5036 Improve CommonFilter and WebServletConfig in Sentinel Web Servlet adapter
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-11-06 15:28:37 +08:00
于玉桔 b6c2979cee Update doc for the `HTTP_METHOD_SPECIFY` property item (#1091) 2019-11-06 15:20:43 +08:00
于玉桔 a451d4bbac Support customized block page HTTP status in sentinel-web-servlet-adapter (#1112)
* Return canonical status 429 in the default block handler of sentinel-web-servlet-adapter.
* Add a `csp.sentinel.web.servlet.block.page.http.status` property to support customized block status configuration.
2019-11-06 10:42:50 +08:00
于玉桔 f0e3348caf Add init parameter to support unifying web context name in Sentinel Web CommonFilter (#1111) 2019-10-24 23:24:00 +08:00
Eric Zhao b05502f8c2
Fix hookOnCancel handing logic in SentinelReactorSubscriber (#1089)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-10-23 19:35:14 +08:00
于玉桔 cdd8d6ff6c Support URL exclusion using UrlCleaner in Spring WebFlux adapter (#1049) 2019-10-08 14:14:35 +08:00
jingnan c505ca8aa5 Support registering writable data-source for GatewayFlowRule and customized ApiDefinition (#1057) 2019-09-23 12:37:58 +08:00
于玉桔 c33ed81e5b doc: update UrlCleaner description in sentinel-web-servlet README.md (#1051) 2019-09-20 18:45:24 +08:00
chenledong c8df7e7456 Improve RT statistic and exception tracing in Sentinel gRPC adapter (#995) 2019-08-16 17:40:11 +08:00
Lin.Liang 39293c118b Support adding prefix to Dubbo service resource name in Sentinel Dubbo Adapter (#859) 2019-08-14 23:02:52 +08:00
Eric Zhao e71d036794 Fix test failure in sentinel-grpc-adapter
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-08-14 20:43:30 +08:00
Mr.Z b2ff4b719b Fix the bug of wrong RT and exception tracing in sentinel-grpc-adapter (#291) 2019-08-14 17:04:36 +08:00
Eric Zhao 37e78e511d
Use the unified context name instead in Web Servlet filter and code improvement (#944)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-07-29 14:40:59 +08:00
Eric Zhao 103fa307e5 Add Ordered support for Spring Cloud Gateway adapter
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-07-25 15:21:22 +08:00
Eric Zhao fb31bb8d4d Fix the empty value matching bug in GatewayParamParser of API gateway adapter common module
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-07-25 15:21:22 +08:00
lym-ifae 7dd20dd202 Add support for excluding some URLs in Web Servlet CommonFilter (#914) 2019-07-16 17:54:27 +08:00
cdfive eda7fdc5c8 Add parse method for parse ApiPredicateItem from json string in UpdateGatewayApiDefinitionGroupCommandHandler 2019-07-10 09:37:00 +08:00
Eric Zhao 56e463e1fe
Add support for request item pattern matching in API gateway flow control (#842)
- Update the `GatewayParamParser` to support matching the request item.
- Update the internal logic of converting gateway rules to parameter flow rules. The unified mismatched parameters (`SentinelGatewayConstants.GATEWAY_NOT_MATCH_PARAM`) will be configured as an exception item with a large threshold (indicating always pass).
- Add a `GatewayRegexCache` to cache the compiled regex for performance.
- Constant rename: separate URL matching strategy from parameter matching strategy

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-06-18 14:08:54 +08:00
Eric Zhao 08676c4f6e
Support parsing cookie as request items in gateway flow control (#814)
- Add `getCookieValue` method in RequestItemParser interface and update GatewayParamParser
- Add cookie parsing logic for Spring Cloud Gateway and Zuul

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-06-14 17:48:03 +08:00
Eric Zhao f8ebbbccf4 Bump version to 1.7.0-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-05-25 15:07:19 +08:00
Eric Zhao 3d2c33ef1d Bump version to 1.6.1 (release)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-05-23 09:49:15 +08:00
Eric Zhao 8d0bb691b3 Fix the bug for parsing with only non-param gateway rules
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-05-22 09:47:41 +08:00
Eric Zhao ae0b8a5c74 Refactor API gateway common module to separate converted rules from other rule managers
- Separate converted parameter rules from ParamFlowManager. Now the converted rules will be kept in GatewayRuleManager directly.
- Add a GatewayFlowSlot to do separate flow checking for generated rules.
- Refactor rule converting mechanism: now gateway rules in normal mode (without parameter) will also be converted to a parameter flow rule. The index will be the last (the last position). In GatewayParamParser we put a constant value to the last position.

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-05-22 09:47:41 +08:00
Eric Zhao 0508c92665
Fix the bug that parameters are not carried when exiting entries in SentinelReactorSubscriber 2019-05-10 14:47:18 +08:00
尹吉欢 274ecb51c3 Fix the bug that Chinese characters are malformed in response body of ZuulBlockFallbackProvider (#737) 2019-05-09 10:07:27 +08:00
Eric Zhao 346e9b274e Bump version to 1.6.1-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-04-25 09:38:59 +08:00
Eric Zhao b1345f751f Bump version to 1.6.0 (release)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-04-24 20:42:32 +08:00
Eric Zhao 1baac7783d Refactor and improve Sentinel Zuul Adapter
- Now the adapter is based-on sentinel-api-gateway-adapter-common and supports both proxyId and customized APIs

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-04-24 17:55:40 +08:00
Eric Zhao 540428bae0 Support getting and updating gateway rules and API groups via transport command
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-04-24 09:40:35 +08:00
Eric Zhao 0f875d89f3 Add Sentinel Spring Cloud Gateway adapter module and implementation
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-04-23 14:32:29 +08:00
Eric Zhao faceb5f419 Add sentinel-api-gateway-adapter-common module for universal gateway rule and API definition management
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-04-23 14:32:29 +08:00
Eric Zhao b02ef82c62 Add constructor for EntryConfig in sentinel-reactor-adapter
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-04-11 17:11:52 +08:00
Eric Zhao fc550343c7 Support passing parameters via SentinelReactorTransformer
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-04-04 09:36:04 +08:00
Eric Zhao afc77c2b3e Fix the bug that entry in SentinelReactorSubscriber did not carry expected entry type
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-04-04 09:36:04 +08:00
Eric Zhao 0c3bf96678 Bump version to 1.6.0-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-03-27 18:00:06 +08:00
Eric Zhao 48286e0ff8 Bump version to 1.5.1 (release)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-03-27 15:23:11 +08:00
Eric Zhao 0389974d2d Add adapter module for Apache Dubbo 2.7.x and above
- copied legacy code and adapts to new package
- also update document for legacy Dubbo adapter

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-03-27 14:20:13 +08:00
Eric Zhao 7f29773a34
Update Dubbo version to 2.6.x in sentinel-dubbo-adapter and demo (#617)
because Dubbo 2.5.x will be deprecated soon

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-03-27 10:54:27 +08:00
cdfive 6d1e7bcb7a Add some unit test for sentinel-dubbo-adapter module (#569) 2019-03-16 12:32:35 +08:00
Eric Zhao 0d4c47b23e Bump version to 1.5.1-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-03-14 16:50:53 +08:00
Eric Zhao 053f7172a3 Bump version to 1.5.0 (release)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-03-14 15:33:57 +08:00
Eric Zhao 1a482b1d9f doc: Update README for new adapter modules
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-03-14 10:21:00 +08:00
Eric Zhao 4b1ccd93e2
Refactor Node interface: change return type of `xxxQps` method from long to double (#564)
- Update test cases (use assertEquals(e, a, delta) instead)
- Also add `totalPass` method in Node interface

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-03-13 22:10:20 +08:00
Eric Zhao efcd877714 Add integration test for SentinelWebFluxFilter
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-03-11 18:58:42 +08:00
Eric Zhao d481014d8a Add adapter module and implementation for Spring WebFlux
- The implementation leverages Sentinel Reactor Adapter. Two main components: SentinelWebFluxFilter and SentinelBlockExceptionHandler

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-03-11 18:58:42 +08:00
Eric Zhao e857b5cef7
Reactive: add Sentinel Reactor adapter module (#545)
* Add reactive adapter implementation for Project Reactor (Mono/Flux) including a reactor transformer and an experimental `ReactorSphU`
* Add an `InheritableBaseSubscriber` that derives from the original BaseSubscriber of reactor-core
* Add basic test cases for reactor adapter
* Add Sentinel context enter support for EntryConfig in reactor transformer

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-03-08 09:43:06 +08:00
Jason Joo 5d3ccb0863 Solve the issue that sleeping-based tests are not stable and optimize slow tests (#546) 2019-03-06 16:49:59 +08:00
Eric Zhao 5b260a9f75 Bump version to 1.5.0-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-02-21 19:41:50 +08:00
Eric Zhao 2e0fe23384 Bump version to 1.4.2 (release)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-02-20 14:15:33 +08:00
Eric Zhao a06a7cf86e Update document and pom for sentinel-zuul-adapter
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-01-14 14:08:42 +08:00
moon tiger 3a1eb56338 Add adapter support for Zuul 1.x (#188)
- implement `SentinelPreFilter`, `SentinelPostFilter` and `SentinelErrorFilter`
- support fallback
2019-01-12 10:16:12 +08:00
Eric Zhao d4d85dbc7c Bump version to 1.4.2-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-01-04 19:08:07 +08:00
Eric Zhao 225d81ed93 Bump version to 1.4.1
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-01-04 14:59:50 +08:00
Eric Zhao 832d6e425d Update document to meet Markdown lint
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-29 15:23:27 +08:00
Eric Zhao 9916dad403 Bump version to 1.4.1-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-17 10:23:19 +08:00
Eric Zhao c7b5653249 Bump version to 1.4.0
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 14:59:27 +08:00
Yuanqing Luo 6802f97528 Add HTTP-method level flow control support in Sentinel Web Servlet Filter (#282)
- Add HTTP method level support for servlet filter with a init parameter `HTTP_METHOD_SPECIFY` as the switch. This is useful for REST APIs.
- Add test cases and fix test bug by reset the cluster node in ClusterBuilderSlot
2018-12-09 23:08:03 +08:00
Eric Zhao d29c4ca9c9 Update gRPC adapter test cases
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-12 10:19:24 +08:00
Carpenter Lee d71e95c611 Remove ContextUtil.enter() in client/consumer side 2018-11-08 17:52:52 +08:00
Eric Zhao 695fa9d84c Update test cases for Sentinel web filter and gRPC adapter
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-08 17:11:47 +08:00
Eric Zhao 3de817be10 Update .travis.yml and dependencies to support build with JDK 11
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-06 21:01:41 +08:00
Eric Zhao e322df2d32 Update documentation and issue template
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-10-30 19:07:18 +08:00
Eric Zhao bffa4ff777 Bump version to 1.4.0-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-10-30 16:06:32 +08:00
Eric Zhao f4b5fae130 Bump version to 1.3.0-GA and update dependencies
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-10-30 15:01:51 +08:00
shannon312 4198d217e5 Extract slash as a constant to reuse in FilterUtil (#204) 2018-10-29 09:22:39 +08:00
Carpenter Lee d726e62de2 Add BlockException parameter to UrlBlockHandler.blocked() method 2018-10-26 13:51:46 +08:00
Eric Zhao 531578ce54 Bump version to 1.3.0-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-10-24 15:52:11 +08:00
李豪 03922dbf6c
Enhancement/normalize metric field (#170)
normalize metric fields and methods:
- rename exception to exceptionQps;
- remove ed postfix of all fields and methods about metrics;
2018-10-11 09:28:43 +08:00
Eric Zhao 94dc7966ae Bump version to 0.2.1-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-09-28 17:18:41 +08:00
Eric Zhao 1063974ceb Bump version to 0.2.0
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-09-27 17:59:23 +08:00
Eric Zhao cf1cf8a59f Update dependencies
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-09-26 15:03:19 +08:00
Eric Zhao 90d5611b23 Update Sentinel Web Servlet integration
- Add RequestOriginParser interface to extract request origin from the HTTP request
- Some code refinement

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-09-20 23:19:17 +08:00
refactormachine b61be268a3 Refactor test cases for Sentinel gRPC Adapter (#101)
- Added a GrpcTestServer to abstract common server logic
- Refactor with new added `GrpcTestServer`
2018-08-30 23:57:23 +08:00
Eric Zhao 49097fa45c Resolves #61: Enhance exception trace in Sentinel Dubbo Adapter
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-08-15 15:16:33 +08:00
Eric Zhao b42a930a83 Update documents
- Add Maven Central badge

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-08-09 15:42:11 +08:00
Eric Zhao b212e5f26e Bump version to 0.2.0-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-08-08 20:45:25 +08:00
Eric Zhao 6bef9a8ee1 Bump version to 0.1.1
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-08-08 19:57:37 +08:00
Eric Zhao 73b0979542 Remove sentinel-spring-boot-starter module
- This has been replaced with Spring Cloud Alibaba

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-08-08 17:19:16 +08:00
Eric Zhao b37c237a61 Add default fallback support for Dubbo
- Update test cases and demo

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-08-08 10:09:13 +08:00
Eric Zhao 2f8a818d20 Add log when initializing Sentinel Dubbo filters
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-07-30 19:11:20 +08:00
Eric Zhao 934816b9ab Bump version to 0.1.1-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-07-27 16:47:14 +08:00
Eric Zhao c92fea5d46 Welcome to the world, Sentinel 2018-07-27 16:34:30 +08:00