File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
gax-java/gax/src/main/java/com/google/api/gax/tracing
java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 3232
3333import com .google .api .core .BetaApi ;
3434import com .google .api .core .InternalApi ;
35+ import com .google .api .gax .logging .LoggingUtils ;
3536import com .google .common .annotations .VisibleForTesting ;
3637
37- /** A {@link ApiTracerFactory} that creates instances of {@link LoggingTracer}. */
38+ /** A {@link ApiTracerFactory} that creates instances of {@link LoggingTracer}.
39+ * This class is intended for internal framework use only. Manual instantiation
40+ * is discouraged; the lifecycle is managed automatically by the system,
41+ * when {@link LoggingUtils#isLoggingEnabled()} returning {@code true}.
42+ * */
3843@ BetaApi
3944@ InternalApi
4045public class LoggingTracerFactory implements ApiTracerFactory {
Original file line number Diff line number Diff line change 5757import org .junit .jupiter .api .BeforeEach ;
5858import org .junit .jupiter .api .Test ;
5959
60- class ITCompositeTracing {
60+ class ITCompositeTracer {
6161 private static final String SHOWCASE_SERVER_ADDRESS = "localhost" ;
6262 private static final String SHOWCASE_ARTIFACT = "com.google.cloud:gapic-showcase" ;
6363
@@ -94,11 +94,9 @@ void tearDown() {
9494
9595 private CompositeTracerFactory createCompositeTracerFactory () {
9696 SpanTracerFactory spanTracerFactory = new SpanTracerFactory (openTelemetrySdk );
97- LoggingTracerFactory loggingTracerFactory = new LoggingTracerFactory ();
9897 GoldenSignalsMetricsTracerFactory metricsTracerFactory = new GoldenSignalsMetricsTracerFactory (openTelemetrySdk );
9998
100- return new CompositeTracerFactory (
101- Arrays .asList (spanTracerFactory , loggingTracerFactory , metricsTracerFactory ));
99+ return new CompositeTracerFactory (Arrays .asList (spanTracerFactory , metricsTracerFactory ));
102100 }
103101
104102 @ Test
@@ -138,8 +136,6 @@ void testCompositeTracer() throws Exception {
138136 .getAttributes ()
139137 .get (AttributeKey .stringKey (ObservabilityAttributes .SERVER_ADDRESS_ATTRIBUTE )))
140138 .isEqualTo (SHOWCASE_SERVER_ADDRESS );
141-
142- // TODO: Verify Logging with basic attributes
143139 }
144140 }
145141}
You can’t perform that action at this time.
0 commit comments