Skip to content

Commit

Permalink
feat: Add automatic instrumentation of MassTransit clients v7 and v8. (
Browse files Browse the repository at this point in the history
…#1972)

* Add auto-instrumentation for MassTransit v7 and v8.

* Update RabbitMQ HandleBasicDeliver instrumentation

* Clean up POC branch (#1970)

* Add integration tests for MassTransit (#2014)

* Initial exerciser implementation

* Cleanup

* Build works for all TFMS

* Add legacy (7.x) exerciser

Also cleanup, and rename start/stop methods

* Unify v7/v8 exercisers

Also pass in queue name as a parameter to StartBus to help with test assertions

* Implement send

* Adding alternate instrumentation point and first pass at tests (#2001)

* Checkpoint trying to get hosted service model working for v7

* Message consume is working in v7!

* Add instrumentation project readmes

* Added regex scope, tests are passing

* Test send as well as publish; cleanup

* Expanded tests, updated instrumentation for v7

* Make regex metric name assertions more specific

---------

Co-authored-by: Chris Hynes <[email protected]>

* Limit MassTransit v7 support to 7.1.0 and higher (#2024)

* Updated 7x instrumentation with version ranges

Not quite working, integration tests are failing for StartBus with v7.0.0 due to transaction scope oddness

* Tweak names

* Better ConsoleMF logging

Added millisecond-level timestamps and thread id

* Only support 7.1.0 -> 7.3.1

* Actually make Tid a property

* Enable MassTransit integration tests

* Fix bug with transaction leakage

* Also detach from primary in 8.x filter

* Update project dependencies

* Fix merge issues

* Fix more merge mistakes

---------

Co-authored-by: Jacob Affinito <[email protected]>
Co-authored-by: Chris Hynes <[email protected]>
  • Loading branch information
3 people authored Nov 3, 2023
1 parent 14c6bb1 commit 3b79002
Show file tree
Hide file tree
Showing 29 changed files with 1,006 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/all_solutions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ jobs:
Logging.MaxSamplesStored,
Logging.MetricsAndForwarding,
Logging.ZeroMaxSamplesStored,
Owin,
Owin,
MassTransit,
ReJit.NetCore,
ReJit.NetFramework,
RequestHandling,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
namespaces="[ 'AgentFeatures', 'AgentLogs', 'AgentMetrics', 'Api', 'AppDomainCaching', 'AspNetCore', 'BasicInstrumentation', 'CatInbound', 'CatOutbound', 'CodeLevelMetrics', 'Configuration', \
'CSP', 'CustomAttributes', 'CustomInstrumentation', 'DataTransmission', 'DistributedTracing', 'Errors', 'HttpClientInstrumentation', 'InfiniteTracing', 'Logging.ContextData', \
'Logging.HsmAndCsp', 'Logging.LocalDecoration', 'Logging.LogLevelDetection', 'Logging.MaxSamplesStored', 'Logging.MetricsAndForwarding', 'Logging.ZeroMaxSamplesStored', \
'Owin', 'ReJit.NetCore', 'ReJit.NetFramework', 'RequestHandling', 'RequestHeadersCapture.AspNet', 'RequestHeadersCapture.AspNetCore', 'RequestHeadersCapture.EnvironmentVariables', \
'Owin', 'MassTransit', 'ReJit.NetCore', 'ReJit.NetFramework', 'RequestHandling', 'RequestHeadersCapture.AspNet', 'RequestHeadersCapture.AspNetCore', 'RequestHeadersCapture.EnvironmentVariables', \
'RequestHeadersCapture.Owin', 'RequestHeadersCapture.WCF', 'RestSharp', 'WCF.Client.IIS.ASPDisabled', 'WCF.Client.IIS.ASPEnabled', 'WCF.Client.Self', \
'WCF.Service.IIS.ASPDisabled', 'WCF.Service.IIS.ASPEnabled', 'WCF.Service.Self' ]"
else
Expand Down
17 changes: 16 additions & 1 deletion FullAgent.sln
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Home", "src\Agent\NewRelic\
{00B0CD4C-D7DE-4243-8185-79A912E48291} = {00B0CD4C-D7DE-4243-8185-79A912E48291}
{0962EF35-B457-479E-9A7A-EC43F9EC7180} = {0962EF35-B457-479E-9A7A-EC43F9EC7180}
{0C3E92D7-F16C-4575-9CBB-EB7349A4C5E2} = {0C3E92D7-F16C-4575-9CBB-EB7349A4C5E2}
{0DC126D1-E782-4A41-BA3E-393083F08627} = {0DC126D1-E782-4A41-BA3E-393083F08627}
{10B2665A-B898-49F7-8BCA-2511872B0902} = {10B2665A-B898-49F7-8BCA-2511872B0902}
{1593CA23-F7EC-42F2-A915-F5D5B18F8C6B} = {1593CA23-F7EC-42F2-A915-F5D5B18F8C6B}
{203A8EA4-A0F2-4139-B02E-9B0F2B39C107} = {203A8EA4-A0F2-4139-B02E-9B0F2B39C107}
Expand Down Expand Up @@ -200,6 +201,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Home", "src\Agent\NewRelic\
{EC34F023-223D-432F-9401-9C3ED1B75DE4} = {EC34F023-223D-432F-9401-9C3ED1B75DE4}
{EFFD9051-E3AC-4266-9AF6-7ECC74C032BD} = {EFFD9051-E3AC-4266-9AF6-7ECC74C032BD}
{F889CE37-934F-48F2-A105-6C19CE292D37} = {F889CE37-934F-48F2-A105-6C19CE292D37}
{F921A316-A8D2-4992-B894-69A3B5CA34E3} = {F921A316-A8D2-4992-B894-69A3B5CA34E3}
{FA3ABF45-6DAB-47DC-B886-06BBEFE4292F} = {FA3ABF45-6DAB-47DC-B886-06BBEFE4292F}
EndProjectSection
EndProject
Expand All @@ -217,6 +219,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchangeRedis2Plus", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elasticsearch", "src\Agent\NewRelic\Agent\Extensions\Providers\Wrapper\Elasticsearch\Elasticsearch.csproj", "{D9428449-3E4B-4723-A8AA-1191315C7AAD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MassTransit", "src\Agent\NewRelic\Agent\Extensions\Providers\Wrapper\MassTransit\MassTransit.csproj", "{0DC126D1-E782-4A41-BA3E-393083F08627}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MassTransitLegacy", "src\Agent\NewRelic\Agent\Extensions\Providers\Wrapper\MassTransitLegacy\MassTransitLegacy.csproj", "{F921A316-A8D2-4992-B894-69A3B5CA34E3}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kafka", "src\Agent\NewRelic\Agent\Extensions\Providers\Wrapper\Kafka\Kafka.csproj", "{270A9CC8-8031-49F4-A380-1389E7517DB7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetCore6Plus", "src\Agent\NewRelic\Agent\Extensions\Providers\Wrapper\AspNetCore6Plus\AspNetCore6Plus.csproj", "{D4F48A7F-F3D3-4303-921D-BF7FE34B7118}"
Expand Down Expand Up @@ -451,6 +456,14 @@ Global
{D9428449-3E4B-4723-A8AA-1191315C7AAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9428449-3E4B-4723-A8AA-1191315C7AAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D9428449-3E4B-4723-A8AA-1191315C7AAD}.Release|Any CPU.Build.0 = Release|Any CPU
{0DC126D1-E782-4A41-BA3E-393083F08627}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DC126D1-E782-4A41-BA3E-393083F08627}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DC126D1-E782-4A41-BA3E-393083F08627}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0DC126D1-E782-4A41-BA3E-393083F08627}.Release|Any CPU.Build.0 = Release|Any CPU
{F921A316-A8D2-4992-B894-69A3B5CA34E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F921A316-A8D2-4992-B894-69A3B5CA34E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F921A316-A8D2-4992-B894-69A3B5CA34E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F921A316-A8D2-4992-B894-69A3B5CA34E3}.Release|Any CPU.Build.0 = Release|Any CPU
{270A9CC8-8031-49F4-A380-1389E7517DB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{270A9CC8-8031-49F4-A380-1389E7517DB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{270A9CC8-8031-49F4-A380-1389E7517DB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -528,12 +541,14 @@ Global
{3D69B4C9-FD16-461F-95AF-6FCA6EAA914E} = {5E86E10A-C38F-48CB-ADE9-67B22BB2F50A}
{EC34F023-223D-432F-9401-9C3ED1B75DE4} = {5E86E10A-C38F-48CB-ADE9-67B22BB2F50A}
{D9428449-3E4B-4723-A8AA-1191315C7AAD} = {5E86E10A-C38F-48CB-ADE9-67B22BB2F50A}
{0DC126D1-E782-4A41-BA3E-393083F08627} = {5E86E10A-C38F-48CB-ADE9-67B22BB2F50A}
{F921A316-A8D2-4992-B894-69A3B5CA34E3} = {5E86E10A-C38F-48CB-ADE9-67B22BB2F50A}
{270A9CC8-8031-49F4-A380-1389E7517DB7} = {5E86E10A-C38F-48CB-ADE9-67B22BB2F50A}
{D4F48A7F-F3D3-4303-921D-BF7FE34B7118} = {5E86E10A-C38F-48CB-ADE9-67B22BB2F50A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.2\lib\NET35
SolutionGuid = {D8B98070-6B8E-403C-A07F-A3F2E4A3A3D0}
EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.2\lib\NET35
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = FullAgent.vsmdi
Expand Down
4 changes: 4 additions & 0 deletions build/ArtifactBuilder/CoreAgentComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ protected override void CreateAgentComponents()
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.StackExchangeRedis.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.StackExchangeRedis2Plus.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.NServiceBus.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.MassTransit.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.MassTransitLegacy.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.Kafka.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.AspNetCore6Plus.dll",
};
Expand All @@ -76,6 +78,8 @@ protected override void CreateAgentComponents()
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.StackExchangeRedis.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.StackExchangeRedis2Plus.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.NServiceBus.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.MassTransit.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.MassTransitLegacy.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.Kafka.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.AspNetCore6Plus.Instrumentation.xml",
};
Expand Down
4 changes: 4 additions & 0 deletions build/ArtifactBuilder/FrameworkAgentComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ protected override void CreateAgentComponents()
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.WebServices.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.AspNetCore.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.Owin.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.MassTransit.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.MassTransitLegacy.dll",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.Kafka.dll",
};

Expand Down Expand Up @@ -100,6 +102,8 @@ protected override void CreateAgentComponents()
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.WebOptimization.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.WebServices.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.Misc.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.MassTransit.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.MassTransitLegacy.Instrumentation.xml",
$@"{SourceHomeBuilderPath}\extensions\NewRelic.Providers.Wrapper.Kafka.Instrumentation.xml",
};

Expand Down
27 changes: 25 additions & 2 deletions src/Agent/MsiInstaller/Installer/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,16 @@ SPDX-License-Identifier: Apache-2.0
<Component Id="ElasticsearchWrapperComponent" Guid="{9C233889-69DD-4B8B-A1A6-ABAC6E27A716}">
<File Id="ElasticsearchWrapperFile" Name="NewRelic.Providers.Wrapper.Elasticsearch.dll" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.Elasticsearch.dll"/>
</Component>
<Component Id="MassTransitWrapperComponent" Guid="{E133AC42-B96B-46E5-BB9B-0E001AB6EC73}">
<File Id="MassTransitWrapperFile" Name="NewRelic.Providers.Wrapper.MassTransit.dll" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.MassTransit.dll"/>
</Component>
<Component Id="MassTransitLegacyWrapperComponent" Guid="{E44779CC-4C76-4AB1-9CE3-5C225A7202FB}">
<File Id="MassTransitLegacyWrapperFile" Name="NewRelic.Providers.Wrapper.MassTransitLegacy.dll" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.MassTransitLegacy.dll"/>
</Component>
<Component Id="KafkaWrapperComponent" Guid="{BE97F5F5-A392-48A0-8888-B2973EA09490}">
<File Id="KafkaWrapperFile" Name="NewRelic.Providers.Wrapper.Kafka.dll" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.Kafka.dll"/>
</Component>


<!-- Reference libraries -->
<Component Id="NewRelicCoreReferenceComponent" Guid="{C196ED1E-0FBA-4D36-9C34-E969B0C9E8C9}">
<File Id="NewRelicCoreReferenceFile" Name="NewRelic.Core.dll" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Core.dll"/>
Expand Down Expand Up @@ -524,10 +529,16 @@ SPDX-License-Identifier: Apache-2.0
</Component>
<Component Id="CoreNServiceBusWrapperComponent" Guid="{E315AE98-119D-4E46-BACB-C28CF6016C19}">
<File Id="CoreNServiceBusWrapperFile" Name="NewRelic.Providers.Wrapper.NServiceBus.dll" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.NServiceBus.dll"/>
</Component>
</Component>
<Component Id="CoreElasticsearchWrapperComponent" Guid="{531A713C-B46C-41C8-8B21-49CBD4C0A459}">
<File Id="CoreElasticsearchWrapperFile" Name="NewRelic.Providers.Wrapper.Elasticsearch.dll" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.Elasticsearch.dll"/>
</Component>
<Component Id="CoreMassTransitWrapperComponent" Guid="{9E905BC4-D844-4E9C-AC2E-560C837CDDB8}">
<File Id="CoreMassTransitWrapperFile" Name="NewRelic.Providers.Wrapper.MassTransit.dll" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.MassTransit.dll"/>
</Component>
<Component Id="CoreMassTransitLegacyWrapperComponent" Guid="{8E94ECF6-B1A8-4D83-BDE8-71055FA33C34}">
<File Id="CoreMassTransitLegacyWrapperFile" Name="NewRelic.Providers.Wrapper.MassTransitLegacy.dll" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.MassTransitLegacy.dll"/>
</Component>
<Component Id="CoreKafkaWrapperComponent" Guid="{6CA6D5A4-A204-4B04-A6B5-13D8B3E736C2}">
<File Id="CoreKafkaWrapperFile" Name="NewRelic.Providers.Wrapper.Kafka.dll" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.Kafka.dll"/>
</Component>
Expand Down Expand Up @@ -639,6 +650,12 @@ SPDX-License-Identifier: Apache-2.0
<Component Id="ElasticsearchInstrumentationComponent" Guid="{42D85537-D0AB-44EB-8BE5-4B2EEB26DE91}">
<File Id="ElasticsearchInstrumentationFile" Name="NewRelic.Providers.Wrapper.Elasticsearch.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.Elasticsearch.Instrumentation.xml"/>
</Component>
<Component Id="MassTransitInstrumentationComponent" Guid="{D8DBC7D6-0337-4441-A5BB-C6670300144A}">
<File Id="MassTransitInstrumentationFile" Name="NewRelic.Providers.Wrapper.MassTransit.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.MassTransit.Instrumentation.xml"/>
</Component>
<Component Id="MassTransitLegacyInstrumentationComponent" Guid="{FAD302C1-07BE-4770-85E4-F6EE25E287F3}">
<File Id="MassTransitLegacyInstrumentationFile" Name="NewRelic.Providers.Wrapper.MassTransitLegacy.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.MassTransitLegacy.Instrumentation.xml"/>
</Component>
<Component Id="KafkaInstrumentationComponent" Guid="{9FC86A0E-CACD-4DA8-84F8-20997C904913}">
<File Id="KafkaInstrumentationFile" Name="NewRelic.Providers.Wrapper.Kafka.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)\extensions\NewRelic.Providers.Wrapper.Kafka.Instrumentation.xml"/>
</Component>
Expand Down Expand Up @@ -690,6 +707,12 @@ SPDX-License-Identifier: Apache-2.0
<Component Id="CoreElasticsearchInstrumentationComponent" Guid="{02EFBFF6-9DA8-4138-A03F-E9502B631A76}">
<File Id="CoreElasticsearchInstrumentationFile" Name="NewRelic.Providers.Wrapper.Elasticsearch.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.Elasticsearch.Instrumentation.xml"/>
</Component>
<Component Id="CoreMassTransitInstrumentationComponent" Guid="{7420F63A-BEC7-47E4-A8B3-B81A270DBEB9}">
<File Id="CoreMassTransitInstrumentationFile" Name="NewRelic.Providers.Wrapper.MassTransit.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.MassTransit.Instrumentation.xml"/>
</Component>
<Component Id="CoreMassTransitLegacyInstrumentationComponent" Guid="{A55ED281-B7FA-4BBC-B760-47495EB19BC1}">
<File Id="CoreMassTransitLegacyInstrumentationFile" Name="NewRelic.Providers.Wrapper.MassTransitLegacy.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.MassTransitLegacy.Instrumentation.xml"/>
</Component>
<Component Id="CoreKafkaInstrumentationComponent" Guid="{B2C4F83B-A339-4DBD-B8C4-760C8F72F9FC}">
<File Id="CoreKafkaInstrumentationFile" Name="NewRelic.Providers.Wrapper.Kafka.Instrumentation.xml" KeyPath="yes" Source="$(var.HomeFolderPath)_coreclr\extensions\NewRelic.Providers.Wrapper.Kafka.Instrumentation.xml"/>
</Component>
Expand Down
13 changes: 9 additions & 4 deletions src/Agent/NewRelic/Agent/Core/Utilities/ExtensionsLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,18 @@ public static void Initialize(string installPathExtensionsDirectory)
{ "OpenConnectionWrapperAsync", Path.Combine(_installPathExtensionsDirectory, "NewRelic.Providers.Wrapper.Sql.dll") },

//The NewRelic.Providers.Wrapper.SerilogLogging.dll depends on the Serilog.dll; therefore, it should
//only be loaded by the agent when Serilog is used otherwise assembly load exception will occur.
{ "SerilogCreateLoggerWrapper", Path.Combine(_installPathExtensionsDirectory, "NewRelic.Providers.Wrapper.SerilogLogging.dll") },
//only be loaded by the agent when Serilog is used otherwise an assembly load exception will occur.
{ "SerilogCreateLoggerWrapper", Path.Combine(_installPathExtensionsDirectory, "NewRelic.Providers.Wrapper.SerilogLogging.dll") },
{ "SerilogDispatchWrapper", Path.Combine(_installPathExtensionsDirectory, "NewRelic.Providers.Wrapper.SerilogLogging.dll") },

// Kafka
// Both NewRelic.Providers.Wrapper.MassTransit.dll and NewRelic.Providers.Wrapper.MassTransitLegacy.dll depend on MassTransit assemblies;
// therefore, they should only be loaded by the agent when MassTransit is used, otherwise assembly load exceptions will occur.
{ "TransportConfigWrapper", Path.Combine(_installPathExtensionsDirectory, "NewRelic.Providers.Wrapper.MassTransit.dll") },
{ "TransportConfigLegacyWrapper", Path.Combine(_installPathExtensionsDirectory, "NewRelic.Providers.Wrapper.MassTransitLegacy.dll") },

// Kafka
{ "KafkaProducerWrapper", Path.Combine(_installPathExtensionsDirectory, "NewRelic.Providers.Wrapper.Kafka.dll") },
{ "KafkaSerializerWrapper", Path.Combine(_installPathExtensionsDirectory, "NewRelic.Providers.Wrapper.Kafka.dll") },
{ "KafkaSerializerWrapper", Path.Combine(_installPathExtensionsDirectory, "NewRelic.Providers.Wrapper.Kafka.dll") },
{ "KafkaConsumerWrapper", Path.Combine(_installPathExtensionsDirectory, "NewRelic.Providers.Wrapper.Kafka.dll") }
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2020 New Relic Corporation. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->
<extension xmlns="urn:newrelic-extension">

<instrumentation>

<tracerFactory name="TransportConfigWrapper">

<match assemblyName="MassTransit" className="MassTransit.Configuration.TransportRegistrationBusFactory`1" minVersion="8.0.0">
<exactMethodMatcher methodName="CreateBus" />
</match>
<match assemblyName="MassTransit" className="MassTransit.BusFactoryExtensions" minVersion="8.0.0">
<exactMethodMatcher methodName="Build" parameters="MassTransit.IBusFactory,MassTransit.Configuration.IBusConfiguration,System.Collections.Generic.IEnumerable`1[MassTransit.ValidationResult]" />
</match>
</tracerFactory>

</instrumentation>
</extension>
Loading

0 comments on commit 3b79002

Please sign in to comment.