Commit Graph

39 Commits

Author SHA1 Message Date
张志勇 0d22aca591
Support config from system env in SentinelConfig and polish TransportConfig (#2154)
- An improved method for obtaining IP address and port number from containers
2021-04-27 19:42:22 +08:00
Yanming Zhou df871b0350
Simplify enums: reuse enum name and remove unnecessary code (#2032) 2021-03-04 11:56:02 +08:00
cdfive 62efb78d4e
Refactor SpiLoader and enhance SPI mechanism (#1383)
* Add `@Spi` annotation as the general annotation for SPI definition.
* Add isDefault in @Spi, add loadDefaultInstance and improve loadFirstInstanceOrDefault method, improve test cases
* Add SpiLoaderException class for thrown when something goes wrong while loading Provider
* Rearrange packages of base SPI mechanism

NOTE: this PR contains breaking changes regarding API.
2021-01-27 09:45:56 +08:00
polarbear567 82826fa886
Support both HTTP and HTTPS protocol heart beating to dashboard (#1896)
Apply to both simple-http and netty-http modules.
2020-12-16 09:34:40 +08:00
nickChenyx cc2d1a69a9
Optimize logging statements using placeholder (#1736)
* Optimize logging statements using placeholder to avoid unnecessary concatenation (issue #1735)
2020-09-17 20:42:01 +08:00
Jason Joo 49e60a3e51
Force modifyRule command handler to fail if an incompatible old fastjson found (#1377)
* Note that this is only a temporary solution.
2020-04-03 15:32:42 +08:00
Eric Zhao e4769293dc
Move CommandCenterLog to sentinel-transport-common and polish related code (#1341)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-03-16 22:30:29 +08:00
Eric Zhao 22df09b427 Polish code of transport command centers and heartbeat senders
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-03-14 20:13:21 +08:00
Lin.Liang 72bfe870cb
Improve the logs when the heartbeat response indicates failure (#1303) 2020-03-04 23:38:53 +08:00
Jason Joo cd1d9be0ea
refactor: Migrate the console server's specifying logic into sentinel-transport-common (#926) 2020-02-24 22:45:59 +08:00
mantuliu f3b1b126c8
Improve singleton logic in SendMetricCommandHandler (#1294) 2020-02-19 19:38:24 +08:00
Eric Zhao 9d02e84674 Improve logic for configuring the heartbeat API path in TransportConfig
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-12-10 10:54:41 +08:00
nick.tan 9beb655b42 Support configuration for the heartbeat API path in transport module (#515) 2019-12-10 10:25:00 +08:00
Eric Zhao b0905547ff Use ServiceLoaderUtil to create SPI ServiceLoader
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-10-23 19:20:53 +08:00
Carpenter Lee 18d8b4c8a7
Add CPU usage and system load to metric (#749)
Signed-off-by: Carpenter Lee <hooleeucas@163.com>
2019-05-10 14:20:00 +08:00
Eric Zhao 030ec23736 Make CommandCenterProvider and HeartBeatSenderProvider choose the instance with highest precedence
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-04-17 14:47:09 +08:00
Bo Zhang a3369378ad Apply Alibaba p3c pmd plugin/rules and fix/ignore all violations of priority 1 (#574) 2019-03-15 09:24:39 +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 860e7eb16e Update javadoc for CommandCenterProvider
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-03-11 20:49:29 +08:00
cdfive 61fede3827 Add a CommandCenterProvider to resolve and cache the CommandCenter instance (#409) 2019-03-04 17:34:41 +08:00
Eric Zhao ed5ecd8580 Update command handler demo and code refinement
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-03-01 13:56:55 +08:00
逅弈 59d923ebc1 Add an ApiCommandHandler to list all available commands and description (#491)
* Add a ApiCommandHandler which fetch all registered CommandHandlers so that user can get all available CommandHandlers by request /api
* Add a customized CommandHandler demo
2019-03-01 13:39:50 +08:00
Eric Zhao 25e96a8cd3 Improve cluster state manager
- Support stop cluster mode (`NOT-STARTED` mode)
- Fix bug when updating cluster state via command API (should modify via state property)

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2019-01-04 14:09:29 +08:00
Eric Zhao d3bbe290c2
Refinement for heartbeat logic in sentinel-transport related module (#312)
- Code refinement for heartbeat component in transport related module
- Add remove support of `SentinelConfig`

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-24 18:03:31 +08:00
Eric Zhao d88ffcd697 Small improvements for `sentinel-transport`
- Modify the init order of command center init func to -1 (prioritized than before)
- Add CommandConstants for common use

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-18 21:13:07 +08:00
Carpenter Lee 84934b8679 Catch Throwable rather than Exception when sending heartbeat.
Signed-off-by: Carpenter Lee <hooleeucas@163.com>
2018-12-15 09:05:28 +08:00
Eric Zhao 465b44b7e7
Merge branch 'master' into feature/cluster-flow-control 2018-12-14 10:58:20 +08:00
Eric Zhao 2735954afd Update cluster related command APIs and some enhancement and fix for cluster module
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:54:30 +08:00
Eric Zhao a5819e092d Add HTTP command for modifying global state and client config
- Add several command handlers
- Update cluster state manager

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:54:30 +08:00
nick.tan eb29cc929f Add heartbeat client ip config to resolve ip problem in Docker env (#261) 2018-12-03 09:48:15 +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 9e012d2e20 Refactor version representation and add client version to heartbeat
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-09-25 16:52:28 +08:00
Eric Zhao 007cd9d291 Some refactor of data source
- Add `close` method in WritableDataSource (to extend AutoCloseable in JDK 1.7 later)
- Separate the writable file data source from original class
- Add a sample to show how to register data sources via Sentinel init mechanism
- Separate a writable data source registry from original handler to make it clear

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-09-04 11:09:42 +08:00
Eric Zhao c70d6e92bc Update command handler for modifying rules
- Refine code about writable datasource

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-09-04 11:09:42 +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 1c9f1606ca Fixes #20: Fix runtime port and heartbeat sending logic
- Sentinel should not send heartbeat to dashboard until the runtime port has been settled down

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-08-01 22:07:08 +08:00
Eric Zhao 47d9070a4a
Fixes #9: Use named thread factory for identification (#10)
* Use named thread factory with all thread pools for identification

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-07-30 18:10:56 +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