Class LogsIngestionAsyncClient

java.lang.Object
com.azure.monitor.ingestion.LogsIngestionAsyncClient

public final class LogsIngestionAsyncClient extends Object
The asynchronous client for uploading logs to Azure Monitor.
  • Method Details

    • upload

      public Mono<UploadLogsResult> upload(String dataCollectionRuleId, String streamName, List<Object> logs)
      Uploads logs to Azure Monitor with specified data collection rule id and stream name. The input logs may be too large to be sent as a single request to the Azure Monitor service. In such cases, this method will split the input logs into multiple smaller requests before sending to the service.
      Parameters:
      dataCollectionRuleId - the data collection rule id that is configured to collect and transform the logs.
      streamName - the stream name configured in data collection rule that matches defines the structure of the logs sent in this request.
      logs - the collection of logs to be uploaded.
      Returns:
      the result of the logs upload request.
      Throws:
      NullPointerException - if any of dataCollectionRuleId, streamName or logs are null.
      IllegalArgumentException - if logs is empty.
    • upload

      public Mono<UploadLogsResult> upload(String dataCollectionRuleId, String streamName, List<Object> logs, UploadLogsOptions options)
      Uploads logs to Azure Monitor with specified data collection rule id and stream name. The input logs may be too large to be sent as a single request to the Azure Monitor service. In such cases, this method will split the input logs into multiple smaller requests before sending to the service.
      Parameters:
      dataCollectionRuleId - the data collection rule id that is configured to collect and transform the logs.
      streamName - the stream name configured in data collection rule that matches defines the structure of the logs sent in this request.
      logs - the collection of logs to be uploaded.
      options - the options to configure the upload request.
      Returns:
      the result of the logs upload request.
      Throws:
      NullPointerException - if any of dataCollectionRuleId, streamName or logs are null.
      IllegalArgumentException - if logs is empty.