Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[to #556] metrics: attach cluster label to metrics #558

Merged
merged 11 commits into from
Mar 28, 2022

Conversation

iosmanthus
Copy link
Member

@iosmanthus iosmanthus commented Mar 18, 2022

Signed-off-by: iosmanthus myosmanthustree@gmail.com

What problem does this PR solve?

Issue Number: to #556

Problem Description:

  • code change for client-java
  • code change for grafana panel

Add cluster label for metrics in client-java with the value of cluster id.

  • Need to cherry-pick to the release branch

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
…h-cluster-id

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
@iosmanthus iosmanthus changed the title [to #556] [WIP] metrics: attach cluster label to metrics [to #556] metrics: attach cluster label to metrics Mar 21, 2022
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
@codecov
Copy link

codecov bot commented Mar 21, 2022

Codecov Report

Merging #558 (13f61cf) into master (f4e7c30) will decrease coverage by 0.07%.
The diff coverage is 77.82%.

@@             Coverage Diff              @@
##             master     #558      +/-   ##
============================================
- Coverage     33.13%   33.05%   -0.08%     
+ Complexity     1339     1328      -11     
============================================
  Files           270      270              
  Lines         17054    17131      +77     
  Branches       1950     1950              
============================================
+ Hits           5651     5663      +12     
- Misses        10794    10866      +72     
+ Partials        609      602       -7     
Impacted Files Coverage Δ
src/main/java/org/tikv/common/Snapshot.java 12.24% <0.00%> (-0.26%) ⬇️
src/main/java/org/tikv/common/log/SlowLog.java 100.00% <ø> (ø)
...ain/java/org/tikv/common/log/SlowLogEmptyImpl.java 50.00% <0.00%> (-7.15%) ⬇️
src/main/java/org/tikv/common/log/SlowLogImpl.java 97.05% <0.00%> (-1.45%) ⬇️
...ommon/operation/iterator/ConcreteScanIterator.java 0.00% <0.00%> (ø)
src/main/java/org/tikv/common/util/BackOffer.java 100.00% <ø> (ø)
src/main/java/org/tikv/txn/TTLManager.java 0.00% <0.00%> (ø)
src/main/java/org/tikv/txn/TwoPhaseCommitter.java 5.38% <0.00%> (-0.08%) ⬇️
src/main/java/org/tikv/txn/TxnKVClient.java 15.68% <0.00%> (ø)
.../main/java/org/tikv/common/AbstractGRPCClient.java 45.94% <20.68%> (+0.49%) ⬆️
... and 25 more

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 f4e7c30...13f61cf. Read the comment docs.

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

since each session is connected to a tikv cluster, can you init the cluster id when TiSession is created?

src/main/java/org/tikv/common/ClusterIdRecorder.java Outdated Show resolved Hide resolved
Copy link
Collaborator

@marsishandsome marsishandsome left a comment

Choose a reason for hiding this comment

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

LGTM

src/main/java/org/tikv/common/ClusterIdRecorder.java Outdated Show resolved Hide resolved
marsishandsome
marsishandsome previously approved these changes Mar 23, 2022
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
…h-cluster-id

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason enabled auto-merge (squash) March 28, 2022 01:00
@zz-jason zz-jason merged commit 6cbf56a into tikv:master Mar 28, 2022
ti-srebot pushed a commit to ti-srebot/client-java that referenced this pull request Mar 28, 2022
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Collaborator

cherry pick to release-3.1 in PR #579

ti-srebot pushed a commit to ti-srebot/client-java that referenced this pull request Mar 28, 2022
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Collaborator

cherry pick to release-3.2 in PR #580

iosmanthus added a commit to ti-srebot/client-java that referenced this pull request Mar 28, 2022
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
zz-jason added a commit that referenced this pull request Mar 28, 2022
Co-authored-by: iosmanthus <dengliming@pingcap.com>
Co-authored-by: iosmanthus <myosmanthustree@gmail.com>
Co-authored-by: Jian Zhang <zjsariel@gmail.com>
zz-jason added a commit that referenced this pull request Mar 29, 2022
Co-authored-by: iosmanthus <myosmanthustree@gmail.com>
Co-authored-by: Jian Zhang <zjsariel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants