Class StreamingOptions
-
- All Implemented Interfaces:
-
java.io.Serializable
public class StreamingOptions implements Serializable
Configuration options for SSA streaming to OTLP receiver. Supports two modes: sampled (push every N events) or time-window (push averaged metrics over duration).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumStreamingOptions.StreamModeStreaming mode enumeration.
-
Field Summary
Fields Modifier and Type Field Description public Stringendpointpublic StreamingOptions.StreamModemodepublic intsampleFrequencypublic doubletimeWindowSecondspublic StringserviceNamepublic booleanincludeQueueLengthpublic booleanincludeUtilizationpublic booleanincludeThroughputpublic booleanincludeResponseTimepublic booleanincludeArrivalRatepublic booleanfailOnConnectionError
-
Constructor Summary
Constructors Constructor Description StreamingOptions()Default constructor with default settings.
-
Method Summary
Modifier and Type Method Description StreamingOptionsendpoint(String endpoint)Set the OTLP receiver endpoint. StreamingOptionsmode(StreamingOptions.StreamMode mode)Set the streaming mode. StreamingOptionssampleFrequency(int frequency)Set the sample frequency for SAMPLED mode. StreamingOptionstimeWindowSeconds(double seconds)Set the time window duration for TIME_WINDOW mode. StreamingOptionsserviceName(String name)Set the service name for identification in line-est. StreamingOptionsincludeQueueLength(boolean include)Enable or disable queue length metrics. StreamingOptionsincludeUtilization(boolean include)Enable or disable utilization metrics. StreamingOptionsincludeThroughput(boolean include)Enable or disable throughput metrics. StreamingOptionsincludeResponseTime(boolean include)Enable or disable response time metrics. StreamingOptionsincludeArrivalRate(boolean include)Enable or disable arrival rate metrics. StreamingOptionsfailOnConnectionError(boolean fail)Set whether to fail on connection error or fall back to dry-run mode. Array<String>parseEndpoint()Parse endpoint into host and port. StringgetHost()Get the host from the endpoint. intgetPort()Get the port from the endpoint. -
-
Method Detail
-
endpoint
StreamingOptions endpoint(String endpoint)
Set the OTLP receiver endpoint.
- Parameters:
endpoint- The endpoint in format "host:port"- Returns:
this instance for method chaining
-
mode
StreamingOptions mode(StreamingOptions.StreamMode mode)
Set the streaming mode.
- Parameters:
mode- SAMPLED or TIME_WINDOW- Returns:
this instance for method chaining
-
sampleFrequency
StreamingOptions sampleFrequency(int frequency)
Set the sample frequency for SAMPLED mode.
- Parameters:
frequency- Push every N simulation events- Returns:
this instance for method chaining
-
timeWindowSeconds
StreamingOptions timeWindowSeconds(double seconds)
Set the time window duration for TIME_WINDOW mode.
- Parameters:
seconds- Aggregate duration in seconds- Returns:
this instance for method chaining
-
serviceName
StreamingOptions serviceName(String name)
Set the service name for identification in line-est.
- Parameters:
name- Service name- Returns:
this instance for method chaining
-
includeQueueLength
StreamingOptions includeQueueLength(boolean include)
Enable or disable queue length metrics.
- Parameters:
include- true to include, false to exclude- Returns:
this instance for method chaining
-
includeUtilization
StreamingOptions includeUtilization(boolean include)
Enable or disable utilization metrics.
- Parameters:
include- true to include, false to exclude- Returns:
this instance for method chaining
-
includeThroughput
StreamingOptions includeThroughput(boolean include)
Enable or disable throughput metrics.
- Parameters:
include- true to include, false to exclude- Returns:
this instance for method chaining
-
includeResponseTime
StreamingOptions includeResponseTime(boolean include)
Enable or disable response time metrics.
- Parameters:
include- true to include, false to exclude- Returns:
this instance for method chaining
-
includeArrivalRate
StreamingOptions includeArrivalRate(boolean include)
Enable or disable arrival rate metrics.
- Parameters:
include- true to include, false to exclude- Returns:
this instance for method chaining
-
failOnConnectionError
StreamingOptions failOnConnectionError(boolean fail)
Set whether to fail on connection error or fall back to dry-run mode.
- Parameters:
fail- true to throw exception on connection error, false for dry-run mode- Returns:
this instance for method chaining
-
parseEndpoint
Array<String> parseEndpoint()
Parse endpoint into host and port.
- Returns:
array with [host, port] where port is an int as String
-
getPort
int getPort()
Get the port from the endpoint.
- Returns:
port number
-
-
-
-