Skip to content

Commit e4affc7

Browse files
committed
Revert "Remove instrumentation for Protobuf Schema tagging (#6792)"
This reverts commit 34a9b7f.
1 parent e88fa14 commit e4affc7

File tree

11 files changed

+302
-185
lines changed

11 files changed

+302
-185
lines changed

tracer/build/supported_calltargets.g.json

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12582,6 +12582,102 @@
1258212582
"IsAdoNetIntegration": false,
1258312583
"InstrumentationCategory": 1
1258412584
},
12585+
{
12586+
"IntegrationName": "Protobuf",
12587+
"AssemblyName": "Google.Protobuf",
12588+
"TargetTypeName": "Google.Protobuf.IBufferMessage",
12589+
"TargetMethodName": "InternalMergeFrom",
12590+
"TargetReturnType": "System.Void",
12591+
"TargetParameterTypes": [
12592+
"Google.Protobuf.ParseContext&"
12593+
],
12594+
"MinimumVersion": {
12595+
"Item1": 3,
12596+
"Item2": 15,
12597+
"Item3": 0
12598+
},
12599+
"MaximumVersion": {
12600+
"Item1": 3,
12601+
"Item2": 65535,
12602+
"Item3": 65535
12603+
},
12604+
"InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.BufferMessageInternalMergeFromIntegration",
12605+
"IntegrationKind": 2,
12606+
"IsAdoNetIntegration": false,
12607+
"InstrumentationCategory": 1
12608+
},
12609+
{
12610+
"IntegrationName": "Protobuf",
12611+
"AssemblyName": "Google.Protobuf",
12612+
"TargetTypeName": "Google.Protobuf.IBufferMessage",
12613+
"TargetMethodName": "InternalWriteTo",
12614+
"TargetReturnType": "System.Void",
12615+
"TargetParameterTypes": [
12616+
"Google.Protobuf.WriteContext&"
12617+
],
12618+
"MinimumVersion": {
12619+
"Item1": 3,
12620+
"Item2": 15,
12621+
"Item3": 0
12622+
},
12623+
"MaximumVersion": {
12624+
"Item1": 3,
12625+
"Item2": 65535,
12626+
"Item3": 65535
12627+
},
12628+
"InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.BufferMessageInternalWriteToIntegration",
12629+
"IntegrationKind": 2,
12630+
"IsAdoNetIntegration": false,
12631+
"InstrumentationCategory": 1
12632+
},
12633+
{
12634+
"IntegrationName": "Protobuf",
12635+
"AssemblyName": "Google.Protobuf",
12636+
"TargetTypeName": "Google.Protobuf.IMessage",
12637+
"TargetMethodName": "MergeFrom",
12638+
"TargetReturnType": "System.Void",
12639+
"TargetParameterTypes": [
12640+
"Google.Protobuf.CodedInputStream"
12641+
],
12642+
"MinimumVersion": {
12643+
"Item1": 3,
12644+
"Item2": 0,
12645+
"Item3": 0
12646+
},
12647+
"MaximumVersion": {
12648+
"Item1": 3,
12649+
"Item2": 65535,
12650+
"Item3": 65535
12651+
},
12652+
"InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.MessageMergeFromIntegration",
12653+
"IntegrationKind": 2,
12654+
"IsAdoNetIntegration": false,
12655+
"InstrumentationCategory": 1
12656+
},
12657+
{
12658+
"IntegrationName": "Protobuf",
12659+
"AssemblyName": "Google.Protobuf",
12660+
"TargetTypeName": "Google.Protobuf.IMessage",
12661+
"TargetMethodName": "WriteTo",
12662+
"TargetReturnType": "System.Void",
12663+
"TargetParameterTypes": [
12664+
"Google.Protobuf.CodedOutputStream"
12665+
],
12666+
"MinimumVersion": {
12667+
"Item1": 3,
12668+
"Item2": 0,
12669+
"Item3": 0
12670+
},
12671+
"MaximumVersion": {
12672+
"Item1": 3,
12673+
"Item2": 65535,
12674+
"Item3": 65535
12675+
},
12676+
"InstrumentationTypeName": "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.MessageWriteToIntegration",
12677+
"IntegrationKind": 2,
12678+
"IsAdoNetIntegration": false,
12679+
"InstrumentationCategory": 1
12680+
},
1258512681
{
1258612682
"IntegrationName": "RabbitMQ",
1258712683
"AssemblyName": "RabbitMQ.Client",

tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Protobuf/BufferMessageInternalMergeFromIntegration.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf;
1515
/// <summary>
1616
/// System.Void Google.Protobuf.IBufferMessage::InternalMergeFrom(Google.Protobuf.ParseContext) calltarget instrumentation
1717
/// </summary>
18-
// FIXME: Commenting out due to throwing errors.
19-
// [InstrumentMethod(
20-
// AssemblyName = "Google.Protobuf",
21-
// TypeName = "Google.Protobuf.IBufferMessage",
22-
// MethodName = "InternalMergeFrom",
23-
// ParameterTypeNames = ["Google.Protobuf.ParseContext&"],
24-
// ReturnTypeName = ClrNames.Void,
25-
// MinimumVersion = "3.15.0",
26-
// MaximumVersion = "3.*.*",
27-
// IntegrationName = nameof(Configuration.IntegrationId.Protobuf),
28-
// CallTargetIntegrationKind = CallTargetKind.Interface)]
18+
[InstrumentMethod(
19+
AssemblyName = "Google.Protobuf",
20+
TypeName = "Google.Protobuf.IBufferMessage",
21+
MethodName = "InternalMergeFrom",
22+
ParameterTypeNames = ["Google.Protobuf.ParseContext&"],
23+
ReturnTypeName = ClrNames.Void,
24+
MinimumVersion = "3.15.0",
25+
MaximumVersion = "3.*.*",
26+
IntegrationName = nameof(Configuration.IntegrationId.Protobuf),
27+
CallTargetIntegrationKind = CallTargetKind.Interface)]
2928
[Browsable(false)]
3029
[EditorBrowsable(EditorBrowsableState.Never)]
3130
public class BufferMessageInternalMergeFromIntegration

tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Protobuf/BufferMessageInternalWriteToIntegration.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf;
1515
/// <summary>
1616
/// System.Void Google.Protobuf.IBufferMessage::InternalWriteTo(Google.Protobuf.WriteContext) calltarget instrumentation
1717
/// </summary>
18-
// FIXME: Commenting out due to throwing errors.
19-
// [InstrumentMethod(
20-
// AssemblyName = "Google.Protobuf",
21-
// TypeName = "Google.Protobuf.IBufferMessage",
22-
// MethodName = "InternalWriteTo",
23-
// ReturnTypeName = ClrNames.Void,
24-
// ParameterTypeNames = ["Google.Protobuf.WriteContext&"],
25-
// MinimumVersion = "3.15.0",
26-
// MaximumVersion = "3.*.*",
27-
// IntegrationName = nameof(Configuration.IntegrationId.Protobuf),
28-
// CallTargetIntegrationKind = CallTargetKind.Interface)]
18+
[InstrumentMethod(
19+
AssemblyName = "Google.Protobuf",
20+
TypeName = "Google.Protobuf.IBufferMessage",
21+
MethodName = "InternalWriteTo",
22+
ReturnTypeName = ClrNames.Void,
23+
ParameterTypeNames = ["Google.Protobuf.WriteContext&"],
24+
MinimumVersion = "3.15.0",
25+
MaximumVersion = "3.*.*",
26+
IntegrationName = nameof(Configuration.IntegrationId.Protobuf),
27+
CallTargetIntegrationKind = CallTargetKind.Interface)]
2928
[Browsable(false)]
3029
[EditorBrowsable(EditorBrowsableState.Never)]
3130
public class BufferMessageInternalWriteToIntegration

tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Protobuf/MessageMergeFromIntegration.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf;
1515
/// <summary>
1616
/// System.Void Google.Protobuf.IMessage::MergeFrom(Google.Protobuf.CodedInputStream) calltarget instrumentation
1717
/// </summary>
18-
// FIXME: Commenting out due to throwing errors.
19-
// [InstrumentMethod(
20-
// AssemblyName = "Google.Protobuf",
21-
// TypeName = "Google.Protobuf.IMessage",
22-
// MethodName = "MergeFrom",
23-
// ReturnTypeName = ClrNames.Void,
24-
// ParameterTypeNames = ["Google.Protobuf.CodedInputStream"],
25-
// MinimumVersion = "3.0.0",
26-
// MaximumVersion = "3.*.*",
27-
// IntegrationName = nameof(Configuration.IntegrationId.Protobuf),
28-
// CallTargetIntegrationKind = CallTargetKind.Interface)]
18+
[InstrumentMethod(
19+
AssemblyName = "Google.Protobuf",
20+
TypeName = "Google.Protobuf.IMessage",
21+
MethodName = "MergeFrom",
22+
ReturnTypeName = ClrNames.Void,
23+
ParameterTypeNames = ["Google.Protobuf.CodedInputStream"],
24+
MinimumVersion = "3.0.0",
25+
MaximumVersion = "3.*.*",
26+
IntegrationName = nameof(Configuration.IntegrationId.Protobuf),
27+
CallTargetIntegrationKind = CallTargetKind.Interface)]
2928
[Browsable(false)]
3029
[EditorBrowsable(EditorBrowsableState.Never)]
3130
public class MessageMergeFromIntegration

tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Protobuf/MessageWriteToIntegration.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf;
1515
/// <summary>
1616
/// System.Void Google.Protobuf.IMessage::WriteTo(Google.Protobuf.CodedOutputStream) calltarget instrumentation
1717
/// </summary>
18-
// FIXME: Commenting out due to throwing errors.
19-
// [InstrumentMethod(
20-
// AssemblyName = "Google.Protobuf",
21-
// TypeName = "Google.Protobuf.IMessage",
22-
// MethodName = "WriteTo",
23-
// ReturnTypeName = ClrNames.Void,
24-
// ParameterTypeNames = ["Google.Protobuf.CodedOutputStream"],
25-
// MinimumVersion = "3.0.0",
26-
// MaximumVersion = "3.*.*",
27-
// IntegrationName = nameof(Configuration.IntegrationId.Protobuf),
28-
// CallTargetIntegrationKind = CallTargetKind.Interface)]
18+
[InstrumentMethod(
19+
AssemblyName = "Google.Protobuf",
20+
TypeName = "Google.Protobuf.IMessage",
21+
MethodName = "WriteTo",
22+
ReturnTypeName = ClrNames.Void,
23+
ParameterTypeNames = ["Google.Protobuf.CodedOutputStream"],
24+
MinimumVersion = "3.0.0",
25+
MaximumVersion = "3.*.*",
26+
IntegrationName = nameof(Configuration.IntegrationId.Protobuf),
27+
CallTargetIntegrationKind = CallTargetKind.Interface)]
2928
[Browsable(false)]
3029
[EditorBrowsable(EditorBrowsableState.Never)]
3130
public class MessageWriteToIntegration

tracer/src/Datadog.Trace/Generated/net461/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,11 @@ internal static bool IsInstrumentedAssembly(string assemblyName)
464464
"Datadog.Trace.ClrProfiler.AutoInstrumentation.Process.ProcessStartIntegration"
465465
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Process.ProcessStartIntegration"
466466
=> Datadog.Trace.Configuration.IntegrationId.Process,
467+
"Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.BufferMessageInternalMergeFromIntegration"
468+
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.BufferMessageInternalWriteToIntegration"
469+
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.MessageMergeFromIntegration"
470+
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.MessageWriteToIntegration"
471+
=> Datadog.Trace.Configuration.IntegrationId.Protobuf,
467472
"Datadog.Trace.ClrProfiler.AutoInstrumentation.RabbitMQ.BasicDeliverAsyncIntegration"
468473
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.RabbitMQ.BasicDeliverAsyncAsyncIntegration"
469474
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.RabbitMQ.BasicDeliverIntegration"

tracer/src/Datadog.Trace/Generated/net6.0/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,11 @@ internal static bool IsInstrumentedAssembly(string assemblyName)
494494
"Datadog.Trace.ClrProfiler.AutoInstrumentation.Process.ProcessStartIntegration"
495495
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Process.ProcessStartIntegration"
496496
=> Datadog.Trace.Configuration.IntegrationId.Process,
497+
"Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.BufferMessageInternalMergeFromIntegration"
498+
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.BufferMessageInternalWriteToIntegration"
499+
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.MessageMergeFromIntegration"
500+
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.MessageWriteToIntegration"
501+
=> Datadog.Trace.Configuration.IntegrationId.Protobuf,
497502
"Datadog.Trace.ClrProfiler.AutoInstrumentation.RabbitMQ.BasicDeliverAsyncIntegration"
498503
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.RabbitMQ.BasicDeliverAsyncAsyncIntegration"
499504
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.RabbitMQ.BasicDeliverIntegration"

tracer/src/Datadog.Trace/Generated/netcoreapp3.1/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,11 @@ internal static bool IsInstrumentedAssembly(string assemblyName)
489489
"Datadog.Trace.ClrProfiler.AutoInstrumentation.Process.ProcessStartIntegration"
490490
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Process.ProcessStartIntegration"
491491
=> Datadog.Trace.Configuration.IntegrationId.Process,
492+
"Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.BufferMessageInternalMergeFromIntegration"
493+
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.BufferMessageInternalWriteToIntegration"
494+
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.MessageMergeFromIntegration"
495+
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.MessageWriteToIntegration"
496+
=> Datadog.Trace.Configuration.IntegrationId.Protobuf,
492497
"Datadog.Trace.ClrProfiler.AutoInstrumentation.RabbitMQ.BasicDeliverAsyncIntegration"
493498
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.RabbitMQ.BasicDeliverAsyncAsyncIntegration"
494499
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.RabbitMQ.BasicDeliverIntegration"

tracer/src/Datadog.Trace/Generated/netstandard2.0/Datadog.Trace.SourceGenerators/InstrumentationDefinitionsGenerator/InstrumentationDefinitions.g.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,11 @@ internal static bool IsInstrumentedAssembly(string assemblyName)
489489
"Datadog.Trace.ClrProfiler.AutoInstrumentation.Process.ProcessStartIntegration"
490490
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Process.ProcessStartIntegration"
491491
=> Datadog.Trace.Configuration.IntegrationId.Process,
492+
"Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.BufferMessageInternalMergeFromIntegration"
493+
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.BufferMessageInternalWriteToIntegration"
494+
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.MessageMergeFromIntegration"
495+
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.Protobuf.MessageWriteToIntegration"
496+
=> Datadog.Trace.Configuration.IntegrationId.Protobuf,
492497
"Datadog.Trace.ClrProfiler.AutoInstrumentation.RabbitMQ.BasicDeliverAsyncIntegration"
493498
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.RabbitMQ.BasicDeliverAsyncAsyncIntegration"
494499
or "Datadog.Trace.ClrProfiler.AutoInstrumentation.RabbitMQ.BasicDeliverIntegration"

0 commit comments

Comments
 (0)