mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 01:22:26 -04:00
Extract repositories metrics into its own class (#103034)
This PR is a follow up of https://github.com/elastic/elasticsearch/pull/102505#discussion_r1402957598 that move the repositories metrics management into its own class which is then passed around instead of relying on the raw meterRegistry and string metric names.
This commit is contained in:
parent
e20821f13e
commit
b9c29807ec
42 changed files with 210 additions and 145 deletions
|
@ -18,6 +18,7 @@ import org.elasticsearch.env.Environment;
|
|||
import org.elasticsearch.indices.recovery.RecoverySettings;
|
||||
import org.elasticsearch.plugins.Plugin;
|
||||
import org.elasticsearch.plugins.RepositoryPlugin;
|
||||
import org.elasticsearch.repositories.RepositoriesMetrics;
|
||||
import org.elasticsearch.repositories.Repository;
|
||||
import org.elasticsearch.repositories.url.URLRepository;
|
||||
import org.elasticsearch.xcontent.NamedXContentRegistry;
|
||||
|
@ -47,7 +48,8 @@ public class URLRepositoryPlugin extends Plugin implements RepositoryPlugin {
|
|||
NamedXContentRegistry namedXContentRegistry,
|
||||
ClusterService clusterService,
|
||||
BigArrays bigArrays,
|
||||
RecoverySettings recoverySettings
|
||||
RecoverySettings recoverySettings,
|
||||
RepositoriesMetrics repositoriesMetrics
|
||||
) {
|
||||
return Collections.singletonMap(URLRepository.TYPE, metadata -> {
|
||||
assert httpClientFactory.get() != null : "Expected to get a configured http client factory";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue