From f507e57a0b11a1aa3955cca8a8c92ecc5b371c40 Mon Sep 17 00:00:00 2001 From: Utkarsh Umesan Pillai Date: Fri, 18 Mar 2022 15:43:23 -0700 Subject: [PATCH] Rename EntityFrameworkCoreInstrumentation (#261) * Rename EntityFrameworfCoreInstrumentation --- ...ge-Instrumentation.EntityFrameworkCore.yml | 4 +-- opentelemetry-dotnet-contrib.sln | 28 +++++++++--------- .../CHANGELOG.md | 3 -- .../README.md | 14 --------- .../CHANGELOG.md | 29 +++++++++++++++++++ .../EntityFrameworkInstrumentation.cs | 5 ++-- .../EntityFrameworkInstrumentationOptions.cs | 2 +- .../EntityFrameworkDiagnosticListener.cs | 2 +- ...tityFrameworkInstrumentationEventSource.cs | 2 +- ...nstrumentation.EntityFrameworkCore.csproj} | 0 .../Properties/AssemblyInfo.cs | 4 +-- .../README.md | 17 +++++++++++ .../TracerProviderBuilderExtensions.cs | 4 +-- .../EntityFrameworkDiagnosticListenerTests.cs | 4 +-- ...entation.EntityFrameworkCore.Tests.csproj} | 2 +- 15 files changed, 74 insertions(+), 46 deletions(-) delete mode 100644 src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/CHANGELOG.md delete mode 100644 src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/README.md create mode 100644 src/OpenTelemetry.Instrumentation.EntityFrameworkCore/CHANGELOG.md rename src/{OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore => OpenTelemetry.Instrumentation.EntityFrameworkCore}/EntityFrameworkInstrumentation.cs (88%) rename src/{OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore => OpenTelemetry.Instrumentation.EntityFrameworkCore}/EntityFrameworkInstrumentationOptions.cs (96%) rename src/{OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore => OpenTelemetry.Instrumentation.EntityFrameworkCore}/Implementation/EntityFrameworkDiagnosticListener.cs (99%) rename src/{OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore => OpenTelemetry.Instrumentation.EntityFrameworkCore}/Implementation/EntityFrameworkInstrumentationEventSource.cs (97%) rename src/{OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.csproj => OpenTelemetry.Instrumentation.EntityFrameworkCore/OpenTelemetry.Instrumentation.EntityFrameworkCore.csproj} (100%) rename src/{OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore => OpenTelemetry.Instrumentation.EntityFrameworkCore}/Properties/AssemblyInfo.cs (58%) create mode 100644 src/OpenTelemetry.Instrumentation.EntityFrameworkCore/README.md rename src/{OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore => OpenTelemetry.Instrumentation.EntityFrameworkCore}/TracerProviderBuilderExtensions.cs (93%) rename test/{OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests => OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests}/EntityFrameworkDiagnosticListenerTests.cs (97%) rename test/{OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests.csproj => OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests.csproj} (86%) diff --git a/.github/workflows/package-Instrumentation.EntityFrameworkCore.yml b/.github/workflows/package-Instrumentation.EntityFrameworkCore.yml index 2b61e7aa0e..a2439768a9 100644 --- a/.github/workflows/package-Instrumentation.EntityFrameworkCore.yml +++ b/.github/workflows/package-Instrumentation.EntityFrameworkCore.yml @@ -1,4 +1,4 @@ -name: Pack OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore +name: Pack OpenTelemetry.Instrumentation.EntityFrameworkCore on: workflow_dispatch: @@ -15,7 +15,7 @@ jobs: build-test-pack: runs-on: ${{ matrix.os }} env: - PROJECT: OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore + PROJECT: OpenTelemetry.Instrumentation.EntityFrameworkCore strategy: matrix: diff --git a/opentelemetry-dotnet-contrib.sln b/opentelemetry-dotnet-contrib.sln index 8a95008c47..c5f4b47056 100644 --- a/opentelemetry-dotnet-contrib.sln +++ b/opentelemetry-dotnet-contrib.sln @@ -76,8 +76,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{E0F52FDB-2 test\Directory.Build.targets = test\Directory.Build.targets EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore", "src\OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore\OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.csproj", "{09525C6C-68B7-405E-B476-23E64D91C11B}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Contrib.Instrumentation.MassTransit", "src\OpenTelemetry.Contrib.Instrumentation.MassTransit\OpenTelemetry.Contrib.Instrumentation.MassTransit.csproj", "{301BFB9F-6D73-4DEE-93D1-75F480816F63}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Contrib.Instrumentation.MassTransit.Tests", "test\OpenTelemetry.Contrib.Instrumentation.MassTransit.Tests\OpenTelemetry.Contrib.Instrumentation.MassTransit.Tests.csproj", "{1F4B5983-EA2E-4DAC-8E02-20C0CDA9FA93}" @@ -132,8 +130,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Contrib.Previ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Contrib.Preview.Tests", "test\OpenTelemetry.Contrib.Preview.Tests\OpenTelemetry.Contrib.Preview.Tests.csproj", "{D2C68560-C252-41A9-B742-2CEB7D760E0F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests", "test\OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests\OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests.csproj", "{4172D671-3AAC-443F-9EB0-A6608B154AF0}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.Quartz", "src\OpenTelemetry.Instrumentation.Quartz\OpenTelemetry.Instrumentation.Quartz.csproj", "{2CFC0D07-7AEC-4BC3-96C4-A06A38DBF6DF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.Quartz.Tests", "test\OpenTelemetry.Instrumentation.Quartz.Tests\OpenTelemetry.Instrumentation.Quartz.Tests.csproj", "{37564EE6-F0A4-4F40-BB13-0BBFAC7F7F28}" @@ -158,6 +154,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Extensions.Pe EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Extensions.PersistentStorage.Tests", "test\OpenTelemetry.Extensions.PersistentStorage.Tests\OpenTelemetry.Extensions.PersistentStorage.Tests.csproj", "{61F40874-7BD2-4814-886E-8D7A463D7F5E}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.EntityFrameworkCore", "src\OpenTelemetry.Instrumentation.EntityFrameworkCore\OpenTelemetry.Instrumentation.EntityFrameworkCore.csproj", "{D4468444-69EF-4BF3-B13F-61F4AB728813}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests", "test\OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests\OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests.csproj", "{A1F7FA66-C83D-485D-90FE-71C4018971D4}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.GrpcCore", "src\OpenTelemetry.Instrumentation.GrpcCore\OpenTelemetry.Instrumentation.GrpcCore.csproj", "{D0B694E4-AAE4-492F-ACCB-3D913A874780}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.GrpcCore.Tests", "test\OpenTelemetry.Instrumentation.GrpcCore.Tests\OpenTelemetry.Instrumentation.GrpcCore.Tests.csproj", "{32D24733-C807-4816-84C3-270CE790AFD4}" @@ -176,10 +176,6 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {09525C6C-68B7-405E-B476-23E64D91C11B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {09525C6C-68B7-405E-B476-23E64D91C11B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {09525C6C-68B7-405E-B476-23E64D91C11B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {09525C6C-68B7-405E-B476-23E64D91C11B}.Release|Any CPU.Build.0 = Release|Any CPU {301BFB9F-6D73-4DEE-93D1-75F480816F63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {301BFB9F-6D73-4DEE-93D1-75F480816F63}.Debug|Any CPU.Build.0 = Debug|Any CPU {301BFB9F-6D73-4DEE-93D1-75F480816F63}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -264,10 +260,6 @@ Global {D2C68560-C252-41A9-B742-2CEB7D760E0F}.Debug|Any CPU.Build.0 = Debug|Any CPU {D2C68560-C252-41A9-B742-2CEB7D760E0F}.Release|Any CPU.ActiveCfg = Release|Any CPU {D2C68560-C252-41A9-B742-2CEB7D760E0F}.Release|Any CPU.Build.0 = Release|Any CPU - {4172D671-3AAC-443F-9EB0-A6608B154AF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4172D671-3AAC-443F-9EB0-A6608B154AF0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4172D671-3AAC-443F-9EB0-A6608B154AF0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4172D671-3AAC-443F-9EB0-A6608B154AF0}.Release|Any CPU.Build.0 = Release|Any CPU {2CFC0D07-7AEC-4BC3-96C4-A06A38DBF6DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2CFC0D07-7AEC-4BC3-96C4-A06A38DBF6DF}.Debug|Any CPU.Build.0 = Debug|Any CPU {2CFC0D07-7AEC-4BC3-96C4-A06A38DBF6DF}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -320,6 +312,14 @@ Global {61F40874-7BD2-4814-886E-8D7A463D7F5E}.Debug|Any CPU.Build.0 = Debug|Any CPU {61F40874-7BD2-4814-886E-8D7A463D7F5E}.Release|Any CPU.ActiveCfg = Release|Any CPU {61F40874-7BD2-4814-886E-8D7A463D7F5E}.Release|Any CPU.Build.0 = Release|Any CPU + {D4468444-69EF-4BF3-B13F-61F4AB728813}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4468444-69EF-4BF3-B13F-61F4AB728813}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4468444-69EF-4BF3-B13F-61F4AB728813}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4468444-69EF-4BF3-B13F-61F4AB728813}.Release|Any CPU.Build.0 = Release|Any CPU + {A1F7FA66-C83D-485D-90FE-71C4018971D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A1F7FA66-C83D-485D-90FE-71C4018971D4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A1F7FA66-C83D-485D-90FE-71C4018971D4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A1F7FA66-C83D-485D-90FE-71C4018971D4}.Release|Any CPU.Build.0 = Release|Any CPU {2815DA76-D855-43FD-A005-FAB289B5EFE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2815DA76-D855-43FD-A005-FAB289B5EFE8}.Debug|Any CPU.Build.0 = Debug|Any CPU {2815DA76-D855-43FD-A005-FAB289B5EFE8}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -344,7 +344,6 @@ Global {43CAFE52-F329-4431-87DA-7FEE1454D9A9} = {1A06E14B-DD2F-4536-9D2E-F708C0C43555} {0112BD4F-B7A6-4E43-AB23-B6E961E27A49} = {824BD1DE-3FA8-4FE0-823A-FD365EAC78AF} {E0F52FDB-23D1-4927-BAB8-332655DD7A0B} = {824BD1DE-3FA8-4FE0-823A-FD365EAC78AF} - {09525C6C-68B7-405E-B476-23E64D91C11B} = {22DF5DC0-1290-4E83-A9D8-6BB7DE3B3E63} {301BFB9F-6D73-4DEE-93D1-75F480816F63} = {22DF5DC0-1290-4E83-A9D8-6BB7DE3B3E63} {1F4B5983-EA2E-4DAC-8E02-20C0CDA9FA93} = {2097345F-4DD3-477D-BC54-A922F9B2B402} {CAD5C27A-D359-4086-9C4F-02204C084A8E} = {22DF5DC0-1290-4E83-A9D8-6BB7DE3B3E63} @@ -368,7 +367,6 @@ Global {C33F2D9D-89A6-459C-9A51-79BA5A9EF194} = {2097345F-4DD3-477D-BC54-A922F9B2B402} {B978939B-278C-43A3-AD12-32EA9BBD27D0} = {22DF5DC0-1290-4E83-A9D8-6BB7DE3B3E63} {D2C68560-C252-41A9-B742-2CEB7D760E0F} = {2097345F-4DD3-477D-BC54-A922F9B2B402} - {4172D671-3AAC-443F-9EB0-A6608B154AF0} = {2097345F-4DD3-477D-BC54-A922F9B2B402} {2CFC0D07-7AEC-4BC3-96C4-A06A38DBF6DF} = {22DF5DC0-1290-4E83-A9D8-6BB7DE3B3E63} {37564EE6-F0A4-4F40-BB13-0BBFAC7F7F28} = {2097345F-4DD3-477D-BC54-A922F9B2B402} {8D11A34C-D0EF-4DE1-8230-32168E67044D} = {B75EE478-97F7-4E9F-9A5A-DB3D0988EDEA} @@ -383,6 +381,8 @@ Global {32D24733-C807-4816-84C3-270CE790AFD4} = {2097345F-4DD3-477D-BC54-A922F9B2B402} {C2B9190B-E2F6-4D40-B298-91521E383A50} = {22DF5DC0-1290-4E83-A9D8-6BB7DE3B3E63} {61F40874-7BD2-4814-886E-8D7A463D7F5E} = {2097345F-4DD3-477D-BC54-A922F9B2B402} + {D4468444-69EF-4BF3-B13F-61F4AB728813} = {22DF5DC0-1290-4E83-A9D8-6BB7DE3B3E63} + {A1F7FA66-C83D-485D-90FE-71C4018971D4} = {2097345F-4DD3-477D-BC54-A922F9B2B402} {2815DA76-D855-43FD-A005-FAB289B5EFE8} = {22DF5DC0-1290-4E83-A9D8-6BB7DE3B3E63} {D7311F9A-BFC3-4470-9C49-39D826BA9996} = {2097345F-4DD3-477D-BC54-A922F9B2B402} {67BFE7DF-505D-427E-8019-40BFF19363E9} = {22DF5DC0-1290-4E83-A9D8-6BB7DE3B3E63} diff --git a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/CHANGELOG.md b/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/CHANGELOG.md deleted file mode 100644 index 1512c42162..0000000000 --- a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -# Changelog - -## Unreleased diff --git a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/README.md b/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/README.md deleted file mode 100644 index bab115a539..0000000000 --- a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# EntityFrameworkCore Instrumentation for OpenTelemetry .NET - -Automatically instruments the outgoing database requests from -[Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore). - -## Installation - -```shell -dotnet add package OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore -``` - -## References - -* [OpenTelemetry Project](https://opentelemetry.io/) diff --git a/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/CHANGELOG.md b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/CHANGELOG.md new file mode 100644 index 0000000000..4ddc0afbbc --- /dev/null +++ b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/CHANGELOG.md @@ -0,0 +1,29 @@ +# Changelog + +## Unreleased + +## 1.0.0-beta.3 + +* Going forward the NuGet package will be + [`OpenTelemetry.Instrumentation.EntityFrameworkCore`](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.EntityFrameworkCore). + Older versions will remain at + [`OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore`](https://www.nuget.org/packages/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore) + [(#261)](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/261) + + Migration: + + * In code update namespaces (eg `using + OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore` -> `using + OpenTelemetry.Instrumentation.EntityFrameworkCore`) + +## 1.0.0-beta2 + +* EntityFrameworkCore instrumentation to depend on API and not SDK + ([#121](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/121)) + +## 0.6.0-beta + +* This is the first release of + `OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore` package. + +For more details, please refer to the [README](README.md). diff --git a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/EntityFrameworkInstrumentation.cs b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/EntityFrameworkInstrumentation.cs similarity index 88% rename from src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/EntityFrameworkInstrumentation.cs rename to src/OpenTelemetry.Instrumentation.EntityFrameworkCore/EntityFrameworkInstrumentation.cs index 227d0240d1..47e976bcf2 100644 --- a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/EntityFrameworkInstrumentation.cs +++ b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/EntityFrameworkInstrumentation.cs @@ -15,10 +15,9 @@ // using System; -using OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Implementation; -using OpenTelemetry.Instrumentation; +using OpenTelemetry.Instrumentation.EntityFrameworkCore.Implementation; -namespace OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore +namespace OpenTelemetry.Instrumentation.EntityFrameworkCore { internal class EntityFrameworkInstrumentation : IDisposable { diff --git a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/EntityFrameworkInstrumentationOptions.cs b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/EntityFrameworkInstrumentationOptions.cs similarity index 96% rename from src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/EntityFrameworkInstrumentationOptions.cs rename to src/OpenTelemetry.Instrumentation.EntityFrameworkCore/EntityFrameworkInstrumentationOptions.cs index 90953cf4bf..ccf8f8576a 100644 --- a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/EntityFrameworkInstrumentationOptions.cs +++ b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/EntityFrameworkInstrumentationOptions.cs @@ -17,7 +17,7 @@ using System.Data; using OpenTelemetry.Trace; -namespace OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore +namespace OpenTelemetry.Instrumentation.EntityFrameworkCore { /// /// Options for . diff --git a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkDiagnosticListener.cs b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkDiagnosticListener.cs similarity index 99% rename from src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkDiagnosticListener.cs rename to src/OpenTelemetry.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkDiagnosticListener.cs index a9aa18f82a..1523802031 100644 --- a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkDiagnosticListener.cs +++ b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkDiagnosticListener.cs @@ -20,7 +20,7 @@ using OpenTelemetry.Instrumentation; using OpenTelemetry.Trace; -namespace OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Implementation +namespace OpenTelemetry.Instrumentation.EntityFrameworkCore.Implementation { internal sealed class EntityFrameworkDiagnosticListener : ListenerHandler { diff --git a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkInstrumentationEventSource.cs b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkInstrumentationEventSource.cs similarity index 97% rename from src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkInstrumentationEventSource.cs rename to src/OpenTelemetry.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkInstrumentationEventSource.cs index 6802f7617d..1868e7d8ad 100644 --- a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkInstrumentationEventSource.cs +++ b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/Implementation/EntityFrameworkInstrumentationEventSource.cs @@ -19,7 +19,7 @@ using System.Globalization; using System.Threading; -namespace OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Implementation +namespace OpenTelemetry.Instrumentation.EntityFrameworkCore.Implementation { [EventSource(Name = "OpenTelemetry-Instrumentation-EntityFrameworkCore")] internal class EntityFrameworkInstrumentationEventSource : EventSource diff --git a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.csproj b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/OpenTelemetry.Instrumentation.EntityFrameworkCore.csproj similarity index 100% rename from src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.csproj rename to src/OpenTelemetry.Instrumentation.EntityFrameworkCore/OpenTelemetry.Instrumentation.EntityFrameworkCore.csproj diff --git a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/Properties/AssemblyInfo.cs b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/Properties/AssemblyInfo.cs similarity index 58% rename from src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/Properties/AssemblyInfo.cs rename to src/OpenTelemetry.Instrumentation.EntityFrameworkCore/Properties/AssemblyInfo.cs index a788569ade..e13ce2b912 100644 --- a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/Properties/AssemblyInfo.cs +++ b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/Properties/AssemblyInfo.cs @@ -17,7 +17,7 @@ using System.Runtime.CompilerServices; #if SIGNED -[assembly: InternalsVisibleTo("OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")] +[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")] #else -[assembly: InternalsVisibleTo("OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests")] +[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests")] #endif diff --git a/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/README.md b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/README.md new file mode 100644 index 0000000000..00a9ef753b --- /dev/null +++ b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/README.md @@ -0,0 +1,17 @@ +# EntityFrameworkCore Instrumentation for OpenTelemetry .NET + +[![NuGet](https://img.shields.io/nuget/v/OpenTelemetry.Instrumentation.EntityFrameworkCore.svg)](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.EntityFrameworkCore) +[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.Instrumentation.EntityFrameworkCore.svg)](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.EntityFrameworkCore) + +Automatically instruments the outgoing database requests from +[Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore). + +## Installation + +```shell +dotnet add package OpenTelemetry.Instrumentation.EntityFrameworkCore +``` + +## References + +* [OpenTelemetry Project](https://opentelemetry.io/) diff --git a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/TracerProviderBuilderExtensions.cs b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/TracerProviderBuilderExtensions.cs similarity index 93% rename from src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/TracerProviderBuilderExtensions.cs rename to src/OpenTelemetry.Instrumentation.EntityFrameworkCore/TracerProviderBuilderExtensions.cs index 1d50a3f9d3..63777f7070 100644 --- a/src/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore/TracerProviderBuilderExtensions.cs +++ b/src/OpenTelemetry.Instrumentation.EntityFrameworkCore/TracerProviderBuilderExtensions.cs @@ -15,8 +15,8 @@ // using System; -using OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore; -using OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Implementation; +using OpenTelemetry.Instrumentation.EntityFrameworkCore; +using OpenTelemetry.Instrumentation.EntityFrameworkCore.Implementation; namespace OpenTelemetry.Trace { diff --git a/test/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests/EntityFrameworkDiagnosticListenerTests.cs b/test/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests/EntityFrameworkDiagnosticListenerTests.cs similarity index 97% rename from test/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests/EntityFrameworkDiagnosticListenerTests.cs rename to test/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests/EntityFrameworkDiagnosticListenerTests.cs index 3d11b3280f..fc289e31f2 100644 --- a/test/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests/EntityFrameworkDiagnosticListenerTests.cs +++ b/test/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests/EntityFrameworkDiagnosticListenerTests.cs @@ -23,12 +23,12 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Moq; -using OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Implementation; +using OpenTelemetry.Instrumentation.EntityFrameworkCore.Implementation; using OpenTelemetry.Internal; using OpenTelemetry.Trace; using Xunit; -namespace OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests +namespace OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests { public class EntityFrameworkDiagnosticListenerTests : IDisposable { diff --git a/test/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests.csproj b/test/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests.csproj similarity index 86% rename from test/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests.csproj rename to test/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests.csproj index 73c5b9a25d..50250ee5a6 100644 --- a/test/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests/OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore.Tests.csproj +++ b/test/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests/OpenTelemetry.Instrumentation.EntityFrameworkCore.Tests.csproj @@ -17,7 +17,7 @@ - +