public static class WavefrontClient.Builder extends Object
| Constructor and Description |
|---|
Builder(String proxyServer)
Create a new WavefrontClient.Builder
|
Builder(String server,
String token)
Create a new WavefrontClient.Builder
|
| Modifier and Type | Method and Description |
|---|---|
WavefrontClient.Builder |
batchSize(int batchSize)
Set batch size to be reported during every flush.
|
WavefrontClient |
build()
Creates a new client that flushes directly to a Proxy or Wavefront service.
|
WavefrontClient.Builder |
flushInterval(int flushInterval,
TimeUnit timeUnit)
Set interval at which you want to flush points to Wavefront cluster.
|
WavefrontClient.Builder |
flushIntervalSeconds(int flushIntervalSeconds)
Set interval (in seconds) at which you want to flush points to Wavefront cluster.
|
WavefrontClient.Builder |
includeSdkMetrics(boolean includeSdkMetrics)
Default is true, if false the internal metrics emitted from this sender will be disabled
|
WavefrontClient.Builder |
maxQueueSize(int maxQueueSize)
Set max queue size of in-memory buffer.
|
WavefrontClient.Builder |
messageSizeBytes(int bytes)
Set max message size, such that each batch is reported as one or more messages where no
message exceeds the specified size in bytes.
|
WavefrontClient.Builder |
metricsPort(int port)
The port metrics will be sent to on the server or proxy, overriding any port set in the
server URL.
|
WavefrontClient.Builder |
sdkMetricsTags(Map<String,String> tags)
Set the tags to apply to the internal SDK metrics
|
WavefrontClient.Builder |
tracesPort(int port)
The port traces will be sent to on the server or proxy, overriding any port set in the
server URL.
|
WavefrontClient.Builder |
validateEndpoint()
For a given server endpoint, validate according to RFC 2396 and attempt
to make a connection
|
public Builder(String server, @Nullable String token)
server - A server URL of the form "https://clusterName.wavefront.com" or
"http://internal.proxy.com:port"token - A valid API token with direct ingestion permissionspublic Builder(String proxyServer)
proxyServer - A server URL of the the form "http://internal.proxy.com:port"public WavefrontClient.Builder maxQueueSize(int maxQueueSize)
maxQueueSize - Max queue size of in-memory bufferthispublic WavefrontClient.Builder batchSize(int batchSize)
batchSize - Batch size to be reported during every flush.thispublic WavefrontClient.Builder flushInterval(int flushInterval, @NonNull TimeUnit timeUnit)
flushInterval - Interval at which you want to flush points to Wavefront clustertimeUnit - Time unit for the specified intervalthispublic WavefrontClient.Builder flushIntervalSeconds(int flushIntervalSeconds)
flushIntervalSeconds - Interval at which you want to flush points to Wavefront clusterthispublic WavefrontClient.Builder messageSizeBytes(int bytes)
Integer.MAX_VALUE.bytes - Maximum number of bytes of data that each reported message contains.thispublic WavefrontClient.Builder metricsPort(int port)
port - Port number metrics will be sent to on the server or proxy.thispublic WavefrontClient.Builder includeSdkMetrics(boolean includeSdkMetrics)
includeSdkMetrics - Whether or not to include the SDK Internal Metricsthispublic WavefrontClient.Builder sdkMetricsTags(Map<String,String> tags)
tags - a map of point tags to apply to the internal sdk metricsthispublic WavefrontClient.Builder tracesPort(int port)
port - Port number traces will be sent to on the server or proxy.thispublic WavefrontClient.Builder validateEndpoint() throws IllegalArgumentException
thisIllegalArgumentExceptionpublic WavefrontClient build()
WavefrontClientIllegalStateExceptionCopyright © 2022. All rights reserved.