-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
LogsUploadFailedEventArgs.cs
55 lines (50 loc) · 2.21 KB
/
LogsUploadFailedEventArgs.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Azure.Core.Pipeline;
using Azure.Core.Serialization;
namespace Azure.Monitor.Ingestion
{
/// <summary>
/// The event argument models configured with the EventHandler to upload logs to Azure Monitor.
/// </summary>
public class LogsUploadFailedEventArgs : SyncAsyncEventArgs
{
/// <summary>
/// Initializes a new instance of the <see cref="LogsUploadFailedEventArgs"/> class.
/// </summary>
/// <param name="failedLogs"></param>
/// <param name="exception"></param>
/// <param name="isRunningSynchronously"></param>
/// <param name="clientDiagnostics"></param>
/// <param name="cancellationToken"></param>
internal LogsUploadFailedEventArgs(IEnumerable<object> failedLogs, Exception exception, bool isRunningSynchronously, ClientDiagnostics clientDiagnostics, CancellationToken cancellationToken) : this (failedLogs, exception, isRunningSynchronously, cancellationToken)
{
ClientDiagnostics = clientDiagnostics;
}
/// <summary>
/// Initializes a new instance of the <see cref="LogsUploadFailedEventArgs"/> class.
/// </summary>
/// <param name="failedLogs"></param>
/// <param name="exception"></param>
/// <param name="isRunningSynchronously"></param>
/// <param name="cancellationToken"></param>
public LogsUploadFailedEventArgs(IEnumerable<object> failedLogs, Exception exception, bool isRunningSynchronously, CancellationToken cancellationToken) : base(isRunningSynchronously, cancellationToken)
{
FailedLogs = failedLogs.ToList();
Exception = exception;
}
/// <summary>
/// The list of logs in the batch that failed to upload.
/// </summary>
public IReadOnlyList<object> FailedLogs { get; }
/// <summary>
/// The exception from the batch that failed to upload.
/// </summary>
public Exception Exception { get; }
internal ClientDiagnostics ClientDiagnostics;
}
}