-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add message related properties to transactions and spans (#1525)
Closes #1512
- Loading branch information
Showing
10 changed files
with
218 additions
and
17 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
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
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,62 @@ | ||
// 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.Api.Constraints; | ||
|
||
namespace Elastic.Apm.Api | ||
{ | ||
/// <summary> | ||
/// Holds details related to message receiving and publishing if the captured event integrates with a messaging system | ||
/// </summary> | ||
public class Message | ||
{ | ||
/// <summary> | ||
/// Body of the received message | ||
/// </summary> | ||
public string Body { get; set; } | ||
|
||
/// <summary> | ||
/// Headers received with the message | ||
/// </summary> | ||
public Dictionary<string, string> Headers { get; set; } | ||
|
||
/// <inheritdoc cref="Api.Age"/> | ||
public Age Age { get; set; } | ||
|
||
/// <see cref="Api.Queue"/> | ||
public Queue Queue { get; set; } | ||
|
||
/// <summary> | ||
/// optional routing key of the received message as set on the queuing system, such as in RabbitMQ. | ||
/// </summary> | ||
public string RoutingKey { get; set; } | ||
} | ||
|
||
/// <summary> | ||
/// Age of the message. If the monitored messaging framework provides a timestamp for the message, agents may use it. | ||
/// Otherwise, the sending agent can add a timestamp in milliseconds since the Unix epoch to the message's metadata to be retrieved by the | ||
/// receiving agent. If a timestamp is not available, agents should omit this field. | ||
/// </summary> | ||
public class Age | ||
{ | ||
/// <summary> | ||
/// Age of the message in milliseconds. | ||
/// </summary> | ||
public long Ms { get; set; } | ||
} | ||
|
||
/// <summary> | ||
/// Information about the message queue where the message is received. | ||
/// </summary> | ||
public class Queue | ||
{ | ||
/// <summary> | ||
/// Name of the message queue where the message is received | ||
/// </summary> | ||
[MaxLength] | ||
public string Name { 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
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
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
Oops, something went wrong.