Use TelemetryProvider in Plugin::createComponents (#99737)

in order to avoid adding yet anther parameter to createComponents
a Tracer interface is replaced with TelemetryProvider.
this allows to get both Tracer and Metric (in the future) interfaces
This commit is contained in:
Przemyslaw Gomulka 2023-09-22 14:48:11 +02:00 committed by GitHub
parent 05879651ff
commit eca41871aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 159 additions and 128 deletions

View file

@ -22,7 +22,7 @@ import org.elasticsearch.indices.IndicesService;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.repositories.RepositoriesService;
import org.elasticsearch.script.ScriptService;
import org.elasticsearch.telemetry.tracing.Tracer;
import org.elasticsearch.telemetry.TelemetryProvider;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.watcher.ResourceWatcherService;
import org.elasticsearch.xcontent.NamedXContentRegistry;
@ -76,7 +76,7 @@ public final class RuntimeFieldsCommonPlugin extends Plugin {
NamedWriteableRegistry namedWriteableRegistry,
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<RepositoriesService> repositoriesServiceSupplier,
Tracer tracer,
TelemetryProvider telemetryProvider,
AllocationService allocationService,
IndicesService indicesService
) {