public static class TraceGrpcApiService.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
TraceGrpcApiService |
build()
Builds a new TraceGrpcApiService.
|
TraceGrpcApiService.Builder |
setBufferSize(int bufferSize)
Sets the buffer size.
|
TraceGrpcApiService.Builder |
setCredentials(com.google.auth.oauth2.GoogleCredentials credentials)
Sets the credentials to be used for the Stackdriver Trace API call.
|
TraceGrpcApiService.Builder |
setProjectId(String projectId)
Sets the projectId.
|
TraceGrpcApiService.Builder |
setScheduledDelay(int scheduledDelay)
Sets the scheduled delay for writing traces.
|
TraceGrpcApiService.Builder |
setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
Sets the
ScheduledExecutorService. |
TraceGrpcApiService.Builder |
setTraceOptionsFactory(TraceOptionsFactory optionsFactory)
Sets the
TraceOptionsFactory. |
public TraceGrpcApiService.Builder setProjectId(String projectId)
projectId - The GCP project the traces should be associated with.public TraceGrpcApiService.Builder setTraceOptionsFactory(TraceOptionsFactory optionsFactory)
TraceOptionsFactory.optionsFactory - The TraceOptionsFactory which will be used for id generation
and sampling decisions. Optional. Defaults to sampling at 1 trace/second.public TraceGrpcApiService.Builder setBufferSize(int bufferSize)
bufferSize - The maximum local buffer size (in bytes) to use before flushing to the
Stackdriver Trace API. Optional. Defaults to 32kb.public TraceGrpcApiService.Builder setScheduledDelay(int scheduledDelay)
scheduledDelay - The maximum number of seconds a Trace will be buffered locally before
being written to the Stackdriver Trace API.public TraceGrpcApiService.Builder setCredentials(com.google.auth.oauth2.GoogleCredentials credentials)
credentials - The credentials to use for calls to the Stackdriver Trace API.public TraceGrpcApiService.Builder setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
ScheduledExecutorService.scheduledExecutorService - The ScheduledExecutorService which will be used for writing traces.
Optional. Defaults to ScheduledThreadPoolExecutor with corePoolSize = 1public TraceGrpcApiService build() throws IOException
IOExceptionCopyright © 2018. All rights reserved.