static StackdriverV2ExporterHandler createWithCredentials( String projectId, Credentials credentials, @javax.annotation.Nullable Map<String, io.opencensus.trace.AttributeValue> fixedAttributes) throws IOException { TraceServiceSettings traceServiceSettings = TraceServiceSettings.newBuilder() .setCredentialsProvider( FixedCredentialsProvider.create(checkNotNull(credentials, "credentials"))) .build(); return new StackdriverV2ExporterHandler( projectId, TraceServiceClient.create(traceServiceSettings), fixedAttributes); }
static StackdriverV2ExporterHandler createWithCredentials( String projectId, Credentials credentials, @javax.annotation.Nullable Map<String, io.opencensus.trace.AttributeValue> fixedAttributes) throws IOException { TraceServiceSettings traceServiceSettings = TraceServiceSettings.newBuilder() .setCredentialsProvider( FixedCredentialsProvider.create(checkNotNull(credentials, "credentials"))) .build(); return new StackdriverV2ExporterHandler( projectId, TraceServiceClient.create(traceServiceSettings), fixedAttributes); }
public static final TraceServiceSettings create(TraceServiceStubSettings stub) throws IOException { return new TraceServiceSettings.Builder(stub.toBuilder()).build(); }
/** Constructs an instance of TraceServiceClient with default settings. */ public static final TraceServiceClient create() throws IOException { return create(TraceServiceSettings.newBuilder().build()); }
@Before public void setUp() throws IOException { serviceHelper.reset(); channelProvider = serviceHelper.createChannelProvider(); TraceServiceSettings settings = TraceServiceSettings.newBuilder() .setTransportChannelProvider(channelProvider) .setCredentialsProvider(NoCredentialsProvider.create()) .build(); client = TraceServiceClient.create(settings); }