Skip to content

Commit

Permalink
Fix direct record methods on instrument to call unbind. (#836)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Cristian Drutu <[email protected]>
  • Loading branch information
bogdandrutu authored Feb 7, 2020
1 parent e7be014 commit a9a31a0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ private DoubleCounterSdk(

@Override
public void add(double delta, LabelSet labelSet) {
bind(labelSet).add(delta);
BoundDoubleCounter boundDoubleCounter = bind(labelSet);
boundDoubleCounter.add(delta);
boundDoubleCounter.unbind();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ private DoubleMeasureSdk(

@Override
public void record(double value, LabelSet labelSet) {
bind(labelSet).record(value);
BoundDoubleMeasure boundDoubleMeasure = bind(labelSet);
boundDoubleMeasure.record(value);
boundDoubleMeasure.unbind();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ private LongCounterSdk(

@Override
public void add(long delta, LabelSet labelSet) {
bind(labelSet).add(delta);
BoundLongCounter boundLongCounter = bind(labelSet);
boundLongCounter.add(delta);
boundLongCounter.unbind();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ private LongMeasureSdk(

@Override
public void record(long value, LabelSet labelSet) {
bind(labelSet).record(value);
BoundLongMeasure boundLongMeasure = bind(labelSet);
boundLongMeasure.record(value);
boundLongMeasure.unbind();
}

@Override
Expand Down

0 comments on commit a9a31a0

Please sign in to comment.