Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Make MetricsProducers default" #29

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,54 @@
*/
package org.commonjava.indy.client.core.metric;

import org.commonjava.cdi.util.weft.config.DefaultWeftConfig;
import org.commonjava.cdi.util.weft.config.WeftConfig;
import org.commonjava.o11yphant.metrics.TrafficClassifier;
import org.commonjava.o11yphant.metrics.conf.DefaultMetricsConfig;
import org.commonjava.o11yphant.metrics.conf.MetricsConfig;
import org.commonjava.o11yphant.metrics.sli.GoldenSignalsMetricSet;
import org.commonjava.o11yphant.metrics.system.StoragePathProvider;

import javax.enterprise.inject.Alternative;
import javax.enterprise.inject.Produces;

/**
* This producer is used to provide the missing CDI deps for indy client metrics sets. User can specify
* customized producers with @Alternative to provide alternative functions.
* This producer is used to provide the missing CDI deps for indy client metrics sets. Now all
* produces provided alternative ones, because it will break indy metrics providers. In future the
* indy-client libs will be extracted to a single lib, so then we will set these providers as default.
*/
public class ClientMetricsProducer
{
@Produces
@Alternative
public TrafficClassifier getClientTrafficClassifier()
{
return new ClientTrafficClassifier();
}

@Produces
@Alternative
public GoldenSignalsMetricSet getClientMetricSet()
{
return new ClientGoldenSignalsMetricSet();
}

@Produces
@Alternative
public MetricsConfig getMetricsConfig()
{
return new DefaultMetricsConfig();
}

@Produces
@Alternative
public WeftConfig getWeftConfig()
{
return new DefaultWeftConfig();
}

@Produces
@Alternative
public StoragePathProvider getStoragePathProvider()
{
return () -> null;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<jhttpcVersion>1.12</jhttpcVersion>
<atlasVersion>1.1.1</atlasVersion>
<indyModelVersion>1.5</indyModelVersion>
<o11yphantVersion>1.9.2-SNAPSHOT</o11yphantVersion>
<o11yphantVersion>1.9.1</o11yphantVersion>
<httpclientVersion>4.5.13</httpclientVersion>
<slf4jVersion>1.7.36</slf4jVersion>
<commonsioVersion>2.11.0</commonsioVersion>
Expand Down
Loading