Package com.arpnetworking.metrics.impl
Class ApacheHttpSink.Builder
java.lang.Object
com.arpnetworking.metrics.impl.ApacheHttpSink.Builder
- Enclosing class:
- ApacheHttpSink
Builder for
ApacheHttpSink
.- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot io), Ville Koskela (ville dot koskela at inscopemetrics dot io)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.arpnetworking.metrics.Sink
build()
Create an instance ofSink
.setBufferSize
(Integer value) Set the buffer size in number of events.Set the dispatch error logging interval.setEmptyQueueInterval
(Duration value) Set the empty queue interval.Set the event handler.Set the events dropped logging interval.setMaxBatchSize
(Integer value) Set the maximum batch size (records to send in each request).setParallelism
(Integer value) Set the parallelism (threads and connections) that the sink will use.Set the unsupported data logging interval.Set the URI of the HTTP endpoint.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setBufferSize
Set the buffer size in number of events. Optional; default is 10,000.- Parameters:
value
- The number of events to buffer.- Returns:
- This
ApacheHttpSink.Builder
instance.
-
setUri
Set the URI of the HTTP endpoint. Optional; default ishttp://localhost:7090/metrics/v3/application
.- Parameters:
value
- The uri of the HTTP endpoint.- Returns:
- This
ApacheHttpSink.Builder
instance.
-
setParallelism
Set the parallelism (threads and connections) that the sink will use. Optional; default is 5.- Parameters:
value
- The uri of the HTTP endpoint.- Returns:
- This
ApacheHttpSink.Builder
instance.
-
setEmptyQueueInterval
Set the empty queue interval. Each worker thread will independently sleep this long if the event queue is empty. Optional; default is 500 milliseconds.- Parameters:
value
- The empty queue interval.- Returns:
- This
ApacheHttpSink.Builder
instance.
-
setMaxBatchSize
Set the maximum batch size (records to send in each request). Optional; default is 500.- Parameters:
value
- The maximum batch size.- Returns:
- This
ApacheHttpSink.Builder
instance.
-
setEventsDroppedLoggingInteval
Set the events dropped logging interval. Any event drop notices will be logged at most once per interval. Optional; default is 1 minute.- Parameters:
value
- The logging interval.- Returns:
- This
ApacheHttpSink.Builder
instance.
-
setDispatchErrorLoggingInterval
Set the dispatch error logging interval. Any dispatch errors will be logged at most once per interval. Optional; default is 1 minute.- Parameters:
value
- The logging interval.- Returns:
- This
ApacheHttpSink.Builder
instance.
-
setUnsupportedDataLoggingInterval
Set the unsupported data logging interval. Any unsupported data errors will be logged at most once per interval. Optional; default is 1 minute.- Parameters:
value
- The logging interval.- Returns:
- This
ApacheHttpSink.Builder
instance.
-
setEventHandler
Set the event handler. Optional; default isnull
.- Parameters:
value
- The event handler.- Returns:
- This
ApacheHttpSink.Builder
instance.
-
build
public com.arpnetworking.metrics.Sink build()Create an instance ofSink
.- Returns:
- Instance of
Sink
.
-