Skip to content

Commit

Permalink
Remove use of createWithClient in src code
Browse files Browse the repository at this point in the history
  • Loading branch information
psx95 committed Mar 13, 2024
1 parent 4394b7e commit d3abd2a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.google.cloud.trace.v2.TraceServiceClient;
import com.google.cloud.trace.v2.TraceServiceSettings;
import com.google.cloud.trace.v2.stub.TraceServiceStub;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableMap;
import com.google.devtools.cloudtrace.v2.AttributeValue;
import com.google.devtools.cloudtrace.v2.ProjectName;
Expand Down Expand Up @@ -56,7 +57,8 @@ class InternalTraceExporter implements SpanExporter {
Map.of("User-Agent", "opentelemetry-operations-java/" + TraceVersions.EXPORTER_VERSION);
private static final HeaderProvider HEADER_PROVIDER = () -> HEADERS;

private static InternalTraceExporter createWithClient(
@VisibleForTesting
static InternalTraceExporter createWithClient(
String projectId,
CloudTraceClient cloudTraceClient,
ImmutableMap<String, String> attributeMappings,
Expand Down Expand Up @@ -104,7 +106,7 @@ static SpanExporter createWithConfiguration(TraceConfiguration configuration) th
configuration.getAttributeMapping(),
configuration.getFixedAttributes());
}
return InternalTraceExporter.createWithClient(
return new InternalTraceExporter(
projectId,
new CloudTraceClientImpl(TraceServiceClient.create(stub)),
configuration.getAttributeMapping(),
Expand Down

0 comments on commit d3abd2a

Please sign in to comment.