Skip to content

Commit

Permalink
Merge pull request #14539 from driv/patch-1
Browse files Browse the repository at this point in the history
Fix counter variable name
  • Loading branch information
rhetoric101 authored Sep 12, 2023
2 parents 5a2cb35 + 2b40f51 commit c0ac31c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -633,15 +633,15 @@ Complete the following to add a custom counter:
private static final AttributeKey<Boolean> ATTR_VALID_N = AttributeKey.booleanKey("fibonacci.valid.n");
private final Tracer tracer;
private final LongCounter myCounter;
private final LongCounter fibonacciInvocations;
@Autowired
Controller(OpenTelemetry openTelemetry) {
// Initialize tracer
tracer = openTelemetry.getTracer(Controller.class.getName());
// Initialize instrument
Meter meter = openTelemetry.getMeter(Controller.class.getName());
myCounter = meter
fibonacciInvocations = meter
.counterBuilder("fibonacci.invocations")
.setDescription("Measures the number of times the fibonacci method is invoked.")
.build();
Expand Down

0 comments on commit c0ac31c

Please sign in to comment.