-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add IntakeResponse deserialization for detailed error logging
Introduced the `IntakeResponse` class to better handle and log errors from APM server responses. Updated `PayloadSenderV2` to use this class for extracting error messages and logging them in a more informative way. Added a deserialization method in `PayloadItemSerializer` for converting response streams.
- Loading branch information
Showing
3 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Licensed to Elasticsearch B.V under | ||
// one or more agreements. | ||
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. | ||
// See the LICENSE file in the project root for more information | ||
|
||
using System.Collections.Generic; | ||
using Elastic.Apm.Libraries.Newtonsoft.Json; | ||
|
||
namespace Elastic.Apm.Report; | ||
|
||
internal class IntakeResponse | ||
{ | ||
[JsonProperty("accepted")] | ||
public int Accepted { get; set; } | ||
|
||
[JsonProperty("errors")] | ||
public IReadOnlyCollection<IntakeError> Errors { get; set; } | ||
} | ||
|
||
internal class IntakeError | ||
{ | ||
|
||
[JsonProperty("message")] | ||
public string Message { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters