LogsUploadOptions Class

  • java.lang.Object
    • com.azure.monitor.ingestion.models.LogsUploadOptions

public final class LogsUploadOptions

The options model to configure the request to upload logs to Azure Monitor.

Constructor Summary

Constructor Description
LogsUploadOptions()

Creates an instance of LogsUploadOptions.

Method Summary

Modifier and Type Method and Description
Consumer<LogsUploadError> getLogsUploadErrorConsumer()

Returns the error handler that is called when a request to the Azure Monitor service to upload logs fails.

Integer getMaxConcurrency()

Returns the max concurrent requests to send to the Azure Monitor service when uploading logs.

ObjectSerializer getObjectSerializer()

Returns the serializer to use to convert the log objects to JSON.

LogsUploadOptions setLogsUploadErrorConsumer(Consumer<LogsUploadError> logsUploadErrorConsumer)

Sets the error handler that is called when a request to the Azure Monitor service to upload logs fails.

LogsUploadOptions setMaxConcurrency(Integer maxConcurrency)

Sets the max concurrent requests to send to the Azure Monitor service when uploading logs.

LogsUploadOptions setObjectSerializer(ObjectSerializer objectSerializer)

Sets the serializer to use to convert the log objects to JSON.

Methods inherited from java.lang.Object

Constructor Details

LogsUploadOptions

public LogsUploadOptions()

Creates an instance of LogsUploadOptions.

Method Details

getLogsUploadErrorConsumer

public Consumer<LogsUploadError> 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.

getMaxConcurrency

public Integer 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.

getObjectSerializer

public 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.

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 LogsUploadOptions instance.

setMaxConcurrency

public LogsUploadOptions setMaxConcurrency(Integer maxConcurrency)

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 LogsUploadOptions instance.

setObjectSerializer

public LogsUploadOptions setObjectSerializer(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 LogsUploadOptions instance.

Applies to