37
37
@ AutoService (DeclarativeConfigurationCustomizerProvider .class )
38
38
public class GcpAuthCustomizerProvider implements DeclarativeConfigurationCustomizerProvider {
39
39
40
- static final String SIGNAL_TARGET_WARNING_FIX_SUGGESTION =
40
+ static final String SIGNAL_TARGET_WARNING_YAML_FIX_SUGGESTION =
41
41
String .format (
42
42
"You may safely ignore this warning if it is intentional, otherwise please configure the '%s' by setting %s in the configuration file." ,
43
43
ConfigurableOption .GOOGLE_OTEL_AUTH_TARGET_SIGNALS .getUserReadableName (),
@@ -48,10 +48,8 @@ public class GcpAuthCustomizerProvider implements DeclarativeConfigurationCustom
48
48
public void customize (DeclarativeConfigurationCustomizer customizer ) {
49
49
customizer .addModelCustomizer (
50
50
model -> {
51
- ConfigProperties configProperties = ConfigPropertiesUtil .resolveModel (model );
52
- GoogleCredentials credentials =
53
- GcpAuthAutoConfigurationCustomizerProvider .getCredentials ();
54
- customize (model , credentials , configProperties );
51
+ customize (model , GcpAuthAutoConfigurationCustomizerProvider .getCredentials (),
52
+ ConfigPropertiesUtil .resolveModel (model ));
55
53
56
54
return model ;
57
55
});
@@ -78,7 +76,7 @@ private static void customizeMeter(
78
76
}
79
77
80
78
if (shouldConfigureExporter (
81
- SIGNAL_TYPE_METRICS , SIGNAL_TARGET_WARNING_FIX_SUGGESTION , configProperties )) {
79
+ SIGNAL_TYPE_METRICS , SIGNAL_TARGET_WARNING_YAML_FIX_SUGGESTION , configProperties )) {
82
80
for (MetricReaderModel reader : meterProvider .getReaders ()) {
83
81
if (reader .getPeriodic () != null ) {
84
82
addAuth (meterModelHeaders (reader .getPeriodic ().getExporter ()), headerMap );
@@ -114,7 +112,7 @@ private static void customizeTracer(
114
112
}
115
113
116
114
if (shouldConfigureExporter (
117
- SIGNAL_TYPE_TRACES , SIGNAL_TARGET_WARNING_FIX_SUGGESTION , configProperties )) {
115
+ SIGNAL_TYPE_TRACES , SIGNAL_TARGET_WARNING_YAML_FIX_SUGGESTION , configProperties )) {
118
116
for (SpanProcessorModel processor : tracerProvider .getProcessors ()) {
119
117
BatchSpanProcessorModel batch = processor .getBatch ();
120
118
if (batch != null ) {
0 commit comments