3737@ AutoService (DeclarativeConfigurationCustomizerProvider .class )
3838public class GcpAuthCustomizerProvider implements DeclarativeConfigurationCustomizerProvider {
3939
40- static final String SIGNAL_TARGET_WARNING_FIX_SUGGESTION =
40+ static final String SIGNAL_TARGET_WARNING_YAML_FIX_SUGGESTION =
4141 String .format (
4242 "You may safely ignore this warning if it is intentional, otherwise please configure the '%s' by setting %s in the configuration file." ,
4343 ConfigurableOption .GOOGLE_OTEL_AUTH_TARGET_SIGNALS .getUserReadableName (),
@@ -48,10 +48,8 @@ public class GcpAuthCustomizerProvider implements DeclarativeConfigurationCustom
4848 public void customize (DeclarativeConfigurationCustomizer customizer ) {
4949 customizer .addModelCustomizer (
5050 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 ));
5553
5654 return model ;
5755 });
@@ -78,7 +76,7 @@ private static void customizeMeter(
7876 }
7977
8078 if (shouldConfigureExporter (
81- SIGNAL_TYPE_METRICS , SIGNAL_TARGET_WARNING_FIX_SUGGESTION , configProperties )) {
79+ SIGNAL_TYPE_METRICS , SIGNAL_TARGET_WARNING_YAML_FIX_SUGGESTION , configProperties )) {
8280 for (MetricReaderModel reader : meterProvider .getReaders ()) {
8381 if (reader .getPeriodic () != null ) {
8482 addAuth (meterModelHeaders (reader .getPeriodic ().getExporter ()), headerMap );
@@ -114,7 +112,7 @@ private static void customizeTracer(
114112 }
115113
116114 if (shouldConfigureExporter (
117- SIGNAL_TYPE_TRACES , SIGNAL_TARGET_WARNING_FIX_SUGGESTION , configProperties )) {
115+ SIGNAL_TYPE_TRACES , SIGNAL_TARGET_WARNING_YAML_FIX_SUGGESTION , configProperties )) {
118116 for (SpanProcessorModel processor : tracerProvider .getProcessors ()) {
119117 BatchSpanProcessorModel batch = processor .getBatch ();
120118 if (batch != null ) {
0 commit comments