From 2b40f51b6276b3156a8cc4b32577768a83658991 Mon Sep 17 00:00:00 2001 From: Federico Nafria Date: Mon, 11 Sep 2023 08:04:28 +0200 Subject: [PATCH] Fix counter variable name The counter is referenced in the next section with a different name. --- .../opentelemetry/get-started/opentelemetry-tutorial-java.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/opentelemetry-tutorial-java.mdx b/src/content/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/opentelemetry-tutorial-java.mdx index 9c9128df8c1..2f1314b2ab1 100644 --- a/src/content/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/opentelemetry-tutorial-java.mdx +++ b/src/content/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/opentelemetry-tutorial-java.mdx @@ -633,7 +633,7 @@ Complete the following to add a custom counter: private static final AttributeKey ATTR_VALID_N = AttributeKey.booleanKey("fibonacci.valid.n"); private final Tracer tracer; - private final LongCounter myCounter; + private final LongCounter fibonacciInvocations; @Autowired Controller(OpenTelemetry openTelemetry) { @@ -641,7 +641,7 @@ Complete the following to add a custom counter: 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();