Class LogsUploadOptions
java.lang.Object
com.azure.monitor.ingestion.models.LogsUploadOptions
The options model to configure the request to upload logs to Azure Monitor.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the error handler that is called when a request to the Azure Monitor service to upload logs fails.Returns the max concurrent requests to send to the Azure Monitor service when uploading logs.com.azure.core.util.serializer.ObjectSerializerReturns the serializer to use to convert the log objects to JSON.setLogsUploadErrorConsumer(Consumer<LogsUploadError> logsUploadErrorConsumer) Sets the error handler that is called when a request to the Azure Monitor service to upload logs fails.setMaxConcurrency(Integer maxConcurrency) Sets the max concurrent requests to send to the Azure Monitor service when uploading logs.setObjectSerializer(com.azure.core.util.serializer.ObjectSerializer objectSerializer) Sets the serializer to use to convert the log objects to JSON.
-
Constructor Details
-
LogsUploadOptions
public LogsUploadOptions()Creates an instance ofLogsUploadOptions.
-
-
Method Details
-
getObjectSerializer
public com.azure.core.util.serializer.ObjectSerializer getObjectSerializer()Returns the serializer to use to convert the log objects to JSON.- Returns:
- the serializer to use to convert the log objects to JSON.
-
setObjectSerializer
public LogsUploadOptions setObjectSerializer(com.azure.core.util.serializer.ObjectSerializer objectSerializer) Sets the serializer to use to convert the log objects to JSON.- Parameters:
objectSerializer- the serializer to use to convert the log objects to JSON.- Returns:
- the updated
LogsUploadOptionsinstance.
-
getMaxConcurrency
Returns the max concurrent requests to send to the Azure Monitor service when uploading logs.- Returns:
- the max concurrent requests to send to the Azure Monitor service when uploading logs.
-
setMaxConcurrency
Sets the max concurrent requests to send to the Azure Monitor service when uploading logs.- Parameters:
maxConcurrency- the max concurrent requests to send to the Azure Monitor service when uploading logs.- Returns:
- the updated
LogsUploadOptionsinstance.
-
getLogsUploadErrorConsumer
Returns the error handler that is called when a request to the Azure Monitor service to upload logs fails.- Returns:
- the error handler that is called when a request to the Azure Monitor service to upload logs fails.
-
setLogsUploadErrorConsumer
public LogsUploadOptions setLogsUploadErrorConsumer(Consumer<LogsUploadError> logsUploadErrorConsumer) Sets the error handler that is called when a request to the Azure Monitor service to upload logs fails.- Parameters:
logsUploadErrorConsumer- the error handler that is called when a request to the Azure Monitor service to upload logs fails.- Returns:
- the updated
LogsUploadOptionsinstance.
-