Skip to content

Conversation

@sczyh30
Copy link
Member

@sczyh30 sczyh30 commented Aug 7, 2018

Describe what this PR does / why we need it

  • Add Sentinel annotation definition (in sentinel-core)
  • Add AspectJ support for Sentinel annotation

Does this pull request fix one issue?

Resolves #11

Describe how you did it

The @SentinelResource contains:

  • resource name (required)
  • resource entry type (optional)
  • fallback method (optional)
  • block handler method (optional)

We've implemented an aspect with the pointcut around any methods annotated with @SentinelResource, and wrap with Sentinel API.

@sczyh30 sczyh30 added the kind/feature Category issues or prs related to feature request. label Aug 7, 2018
@sczyh30 sczyh30 self-assigned this Aug 7, 2018
@sczyh30 sczyh30 added the to-review To review label Aug 7, 2018
@codecov-io
Copy link

codecov-io commented Aug 7, 2018

Codecov Report

Merging #43 into master will decrease coverage by 0.12%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #43      +/-   ##
============================================
- Coverage     46.74%   46.61%   -0.13%     
  Complexity      548      548              
============================================
  Files           106      106              
  Lines          3720     3726       +6     
  Branches        526      526              
============================================
- Hits           1739     1737       -2     
- Misses         1771     1779       +8     
  Partials        210      210
Impacted Files Coverage Δ Complexity Δ
...n/java/com/alibaba/csp/sentinel/log/RecordLog.java 50% <0%> (-21.43%) 3 <0> (ø)
...el/slots/block/flow/controller/PaceController.java 78.26% <0%> (-13.05%) 4% <0%> (-1%)
...a/com/alibaba/csp/sentinel/node/StatisticNode.java 66.66% <0%> (+1.75%) 17% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52f7c56...1c33ffb. Read the comment docs.

- Update javadoc and document

Signed-off-by: Eric Zhao <[email protected]>
Copy link
Member

@flystar32 flystar32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sczyh30 sczyh30 merged commit b1cf30f into master Aug 8, 2018
@sczyh30 sczyh30 deleted the feature/sentinel-annotation branch August 8, 2018 02:40
@sczyh30 sczyh30 removed the to-review To review label Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Category issues or prs related to feature request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Annotation support

4 participants