diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/stats/PulsarWorkerOpenTelemetry.java b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerOpenTelemetry.java similarity index 94% rename from pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/stats/PulsarWorkerOpenTelemetry.java rename to pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerOpenTelemetry.java index 73cc8c7872210..be7c15dfd85e0 100644 --- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/stats/PulsarWorkerOpenTelemetry.java +++ b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerOpenTelemetry.java @@ -16,14 +16,13 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.pulsar.functions.worker.stats; +package org.apache.pulsar.functions.worker; import io.opentelemetry.api.metrics.Meter; import java.io.Closeable; import lombok.Getter; import org.apache.pulsar.PulsarVersion; import org.apache.pulsar.opentelemetry.OpenTelemetryService; -import org.apache.pulsar.functions.worker.WorkerConfig; public class PulsarWorkerOpenTelemetry implements Closeable { @@ -42,6 +41,7 @@ public PulsarWorkerOpenTelemetry(WorkerConfig workerConfig) { meter = openTelemetryService.getOpenTelemetry().getMeter("org.apache.pulsar.function_worker"); } + @Override public void close() { openTelemetryService.close(); } diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java index ee38ed31812a9..9f7d1996e0bb5 100644 --- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java +++ b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/PulsarWorkerService.java @@ -67,7 +67,6 @@ import org.apache.pulsar.functions.worker.service.api.Sinks; import org.apache.pulsar.functions.worker.service.api.Sources; import org.apache.pulsar.functions.worker.service.api.Workers; -import org.apache.pulsar.functions.worker.stats.PulsarWorkerOpenTelemetry; import org.apache.pulsar.metadata.api.MetadataStoreException.AlreadyExistsException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/stats/package-info.java b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/stats/package-info.java deleted file mode 100644 index 134d6189b49bb..0000000000000 --- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/stats/package-info.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.pulsar.functions.worker.stats; \ No newline at end of file diff --git a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/metrics/OpenTelemetrySanityTest.java b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/metrics/OpenTelemetrySanityTest.java index 4520050eb1ae0..2965606ccca78 100644 --- a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/metrics/OpenTelemetrySanityTest.java +++ b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/metrics/OpenTelemetrySanityTest.java @@ -29,7 +29,7 @@ import org.apache.pulsar.PulsarVersion; import org.apache.pulsar.broker.stats.PulsarBrokerOpenTelemetry; import org.apache.pulsar.broker.stats.prometheus.PrometheusMetricsClient; -import org.apache.pulsar.functions.worker.stats.PulsarWorkerOpenTelemetry; +import org.apache.pulsar.functions.worker.PulsarWorkerOpenTelemetry; import org.apache.pulsar.proxy.stats.PulsarProxyOpenTelemetry; import org.apache.pulsar.tests.integration.containers.ChaosContainer; import org.apache.pulsar.tests.integration.containers.OpenTelemetryCollectorContainer;