-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RabbitMQ] bytecode instrumentation for versions 6.*.* - initial (#3533)
* rabbitmq6 bytecode instrumentation * format fixes * casing fix * PR feedback * fix changelog after merge * revert redundant changelog change * pr feedback * fix after rename --------- Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
- Loading branch information
Showing
31 changed files
with
918 additions
and
7 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 |
---|---|---|
|
@@ -50,6 +50,7 @@ PROCESSRUNTIME | |
proto | ||
protobuf | ||
protos | ||
RABBITMQ | ||
Serilog | ||
spdlog | ||
SQLCLIENT | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.AsyncEventingBasicConsumerIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.EventingBasicConsumerIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.ModelBaseBasicGetIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.ModelBasicPublishIntegration |
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,4 @@ | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.AsyncEventingBasicConsumerIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.EventingBasicConsumerIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.ModelBaseBasicGetIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.ModelBasicPublishIntegration |
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
30 changes: 30 additions & 0 deletions
30
...OpenTelemetry.AutoInstrumentation/Instrumentations/RabbitMq6/DuckTypes/IBasicGetResult.cs
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,30 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using OpenTelemetry.AutoInstrumentation.DuckTyping; | ||
|
||
namespace OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.DuckTypes; | ||
|
||
// wraps https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/a50334f2acb09fd16dc9cbd20ad1c6dd093d1d64/projects/RabbitMQ.Client/client/api/BasicGetResult.cs | ||
internal interface IBasicGetResult : IDuckType | ||
{ | ||
public string? Exchange { get; set; } | ||
|
||
public string? RoutingKey { get; set; } | ||
|
||
public IBasicProperties? BasicProperties { get; set; } | ||
|
||
public ulong DeliveryTag { get; set; } | ||
|
||
public IBody Body { get; set; } | ||
} | ||
|
||
// wraps https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/a50334f2acb09fd16dc9cbd20ad1c6dd093d1d64/projects/RabbitMQ.Client/client/api/IBasicProperties.cs | ||
internal interface IBasicProperties : IDuckType | ||
{ | ||
IDictionary<string, object>? Headers { get; set; } | ||
|
||
string? CorrelationId { get; set; } | ||
|
||
string? MessageId { get; set; } | ||
} |
11 changes: 11 additions & 0 deletions
11
src/OpenTelemetry.AutoInstrumentation/Instrumentations/RabbitMq6/DuckTypes/IBody.cs
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,11 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using OpenTelemetry.AutoInstrumentation.DuckTyping; | ||
|
||
namespace OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.DuckTypes; | ||
|
||
internal interface IBody : IDuckType | ||
{ | ||
public int Length { get; } | ||
} |
21 changes: 21 additions & 0 deletions
21
src/OpenTelemetry.AutoInstrumentation/Instrumentations/RabbitMq6/IntegrationConstants.cs
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,21 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
namespace OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6; | ||
|
||
internal static class IntegrationConstants | ||
{ | ||
public const string RabbitMqByteCodeIntegrationName = "RabbitMq"; | ||
public const string RabbitMqAssemblyName = "RabbitMQ.Client"; | ||
public const string ModelBaseTypeName = "RabbitMQ.Client.Impl.ModelBase"; | ||
public const string EventingBasicConsumerTypeName = "RabbitMQ.Client.Events.EventingBasicConsumer"; | ||
public const string AsyncEventingBasicConsumerTypeName = "RabbitMQ.Client.Events.AsyncEventingBasicConsumer"; | ||
public const string ModelGeneratedTypeName = "RabbitMQ.Client.Framing.Impl.Model"; | ||
public const string BasicGetResultTypeName = "RabbitMQ.Client.BasicGetResult"; | ||
public const string BasicPropertiesInterfaceTypeName = "RabbitMQ.Client.IBasicProperties"; | ||
public const string BasicGetMethodName = "BasicGet"; | ||
public const string HandleBasicDeliverMethodName = "HandleBasicDeliver"; | ||
public const string BasicPublishMethodName = "_Private_BasicPublish"; | ||
public const string MinSupportedVersion = "6.0.0"; | ||
public const string MaxSupportedVersion = "6.*.*"; | ||
} |
Oops, something went wrong.