-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RabbitMQ] derived instrumentations for base consumer types (#3559)
derived instrumentations for rabbitmq base consumer types Co-authored-by: Robert Pająk <[email protected]> Co-authored-by: Paulo Janotti <[email protected]>
- Loading branch information
1 parent
8b4cd93
commit 57d80ba
Showing
15 changed files
with
186 additions
and
43 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/OpenTelemetry.AutoInstrumentation/.publicApi/net462/PublicAPI.Unshipped.txt
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.AsyncEventingBasicConsumerIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.EventingBasicConsumerIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.AsyncDefaultBasicConsumerIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.DefaultBasicConsumerIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.ModelBaseBasicGetIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.ModelBasicPublishIntegration |
4 changes: 2 additions & 2 deletions
4
src/OpenTelemetry.AutoInstrumentation/.publicApi/net6.0/PublicAPI.Unshipped.txt
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.AsyncEventingBasicConsumerIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.EventingBasicConsumerIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.AsyncDefaultBasicConsumerIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.DefaultBasicConsumerIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.ModelBaseBasicGetIntegration | ||
OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.ModelBasicPublishIntegration |
35 changes: 35 additions & 0 deletions
35
...rceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.Derived.g.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,35 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by the InstrumentationDefinitionsGenerator tool. To safely | ||
// modify this file, edit InstrumentMethodAttribute on the classes and | ||
// compile project. | ||
|
||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
using OpenTelemetry.AutoInstrumentation.Configurations; | ||
|
||
namespace OpenTelemetry.AutoInstrumentation; | ||
|
||
internal static partial class InstrumentationDefinitions | ||
{ | ||
private static NativeCallTargetDefinition[] GetDerivedDefinitionsArray() | ||
{ | ||
var nativeCallTargetDefinitions = new List<NativeCallTargetDefinition>(2); | ||
// Traces | ||
var tracerSettings = Instrumentation.TracerSettings.Value; | ||
if (tracerSettings.TracesEnabled) | ||
{ | ||
// RabbitMq | ||
if (tracerSettings.EnabledInstrumentations.Contains(TracerInstrumentation.RabbitMq)) | ||
{ | ||
nativeCallTargetDefinitions.Add(new("RabbitMQ.Client", "RabbitMQ.Client.AsyncDefaultBasicConsumer", "HandleBasicDeliver", new[] {"System.Threading.Tasks.Task", "System.String", "System.UInt64", "System.Boolean", "System.String", "System.String", "RabbitMQ.Client.IBasicProperties", "System.ReadOnlyMemory`1[System.Byte]"}, 6, 0, 0, 6, 65535, 65535, AssemblyFullName, "OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.AsyncDefaultBasicConsumerIntegration")); | ||
nativeCallTargetDefinitions.Add(new("RabbitMQ.Client", "RabbitMQ.Client.DefaultBasicConsumer", "HandleBasicDeliver", new[] {"System.Void", "System.String", "System.UInt64", "System.Boolean", "System.String", "System.String", "RabbitMQ.Client.IBasicProperties", "System.ReadOnlyMemory`1[System.Byte]"}, 6, 0, 0, 6, 65535, 65535, AssemblyFullName, "OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.DefaultBasicConsumerIntegration")); | ||
} | ||
} | ||
|
||
return nativeCallTargetDefinitions.ToArray(); | ||
} | ||
} |
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
35 changes: 35 additions & 0 deletions
35
...rceGenerators.InstrumentationDefinitionsGenerator/InstrumentationDefinitions.Derived.g.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,35 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by the InstrumentationDefinitionsGenerator tool. To safely | ||
// modify this file, edit InstrumentMethodAttribute on the classes and | ||
// compile project. | ||
|
||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
using OpenTelemetry.AutoInstrumentation.Configurations; | ||
|
||
namespace OpenTelemetry.AutoInstrumentation; | ||
|
||
internal static partial class InstrumentationDefinitions | ||
{ | ||
private static NativeCallTargetDefinition[] GetDerivedDefinitionsArray() | ||
{ | ||
var nativeCallTargetDefinitions = new List<NativeCallTargetDefinition>(2); | ||
// Traces | ||
var tracerSettings = Instrumentation.TracerSettings.Value; | ||
if (tracerSettings.TracesEnabled) | ||
{ | ||
// RabbitMq | ||
if (tracerSettings.EnabledInstrumentations.Contains(TracerInstrumentation.RabbitMq)) | ||
{ | ||
nativeCallTargetDefinitions.Add(new("RabbitMQ.Client", "RabbitMQ.Client.AsyncDefaultBasicConsumer", "HandleBasicDeliver", new[] {"System.Threading.Tasks.Task", "System.String", "System.UInt64", "System.Boolean", "System.String", "System.String", "RabbitMQ.Client.IBasicProperties", "System.ReadOnlyMemory`1[System.Byte]"}, 6, 0, 0, 6, 65535, 65535, AssemblyFullName, "OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.AsyncDefaultBasicConsumerIntegration")); | ||
nativeCallTargetDefinitions.Add(new("RabbitMQ.Client", "RabbitMQ.Client.DefaultBasicConsumer", "HandleBasicDeliver", new[] {"System.Void", "System.String", "System.UInt64", "System.Boolean", "System.String", "System.String", "RabbitMQ.Client.IBasicProperties", "System.ReadOnlyMemory`1[System.Byte]"}, 6, 0, 0, 6, 65535, 65535, AssemblyFullName, "OpenTelemetry.AutoInstrumentation.Instrumentations.RabbitMq6.Integrations.DefaultBasicConsumerIntegration")); | ||
} | ||
} | ||
|
||
return nativeCallTargetDefinitions.ToArray(); | ||
} | ||
} |
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
10 changes: 10 additions & 0 deletions
10
src/OpenTelemetry.AutoInstrumentation/Instrumentations/IntegrationKind.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,10 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
namespace OpenTelemetry.AutoInstrumentation.Instrumentations; | ||
|
||
internal enum IntegrationKind | ||
{ | ||
Direct = 0, | ||
Derived = 1 | ||
} |
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.