Package com.azure.monitor.ingestion
Class LogsIngestionClient
java.lang.Object
com.azure.monitor.ingestion.LogsIngestionClient
The synchronous client for uploading logs to Azure Monitor.
-
Method Summary
Modifier and TypeMethodDescriptionUploads logs to Azure Monitor with specified data collection rule id and stream name.upload
(String dataCollectionRuleId, String streamName, List<Object> logs, UploadLogsOptions options, com.azure.core.util.Context context) Uploads logs to Azure Monitor with specified data collection rule id and stream name.
-
Method Details
-
upload
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 ofdataCollectionRuleId
,streamName
orlogs
are null.IllegalArgumentException
- iflogs
is empty.
-
upload
public UploadLogsResult upload(String dataCollectionRuleId, String streamName, List<Object> logs, UploadLogsOptions options, com.azure.core.util.Context context) 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.context
- additional context that is passed through the Http pipeline during the service call. If no additional context is required, passContext.NONE
instead.- Returns:
- the result of the logs upload request.
- Throws:
NullPointerException
- if any ofdataCollectionRuleId
,streamName
orlogs
are null.IllegalArgumentException
- iflogs
is empty.
-