diff --git a/OpenTelemetry.sln b/OpenTelemetry.sln
index e3a9bb26aaf..1654c561810 100644
--- a/OpenTelemetry.sln
+++ b/OpenTelemetry.sln
@@ -43,21 +43,21 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Api", "src\Op
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.Prometheus", "src\OpenTelemetry.Exporter.Prometheus\OpenTelemetry.Exporter.Prometheus.csproj", "{AD9B2B54-EC9C-448E-BD3C-EDCC3F7AD022}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Adapter.Dependencies", "src\OpenTelemetry.Adapter.Dependencies\OpenTelemetry.Adapter.Dependencies.csproj", "{D3FFBC59-2486-4F8F-BFF1-FA95C84929E1}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.Dependencies", "src\OpenTelemetry.Instrumentation.Dependencies\OpenTelemetry.Instrumentation.Dependencies.csproj", "{D3FFBC59-2486-4F8F-BFF1-FA95C84929E1}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Adapter.Dependencies.Tests", "test\OpenTelemetry.Adapter.Dependencies.Tests\OpenTelemetry.Adapter.Dependencies.Tests.csproj", "{56E2647A-B814-4BAC-B854-BEA0051B5F2E}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.Dependencies.Tests", "test\OpenTelemetry.Instrumentation.Dependencies.Tests\OpenTelemetry.Instrumentation.Dependencies.Tests.csproj", "{56E2647A-B814-4BAC-B854-BEA0051B5F2E}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Adapter.AspNetCore", "src\OpenTelemetry.Adapter.AspNetCore\OpenTelemetry.Adapter.AspNetCore.csproj", "{752D2182-A351-41D8-99EE-DD363D7D5B43}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.AspNetCore", "src\OpenTelemetry.Instrumentation.AspNetCore\OpenTelemetry.Instrumentation.AspNetCore.csproj", "{752D2182-A351-41D8-99EE-DD363D7D5B43}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Adapter.AspNetCore.Tests", "test\OpenTelemetry.Adapter.AspNetCore.Tests\OpenTelemetry.Adapter.AspNetCore.Tests.csproj", "{2A47F6A8-63E5-4237-8046-94CAF321E797}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.AspNetCore.Tests", "test\OpenTelemetry.Instrumentation.AspNetCore.Tests\OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj", "{2A47F6A8-63E5-4237-8046-94CAF321E797}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testdata", "testdata", "{77C7929A-2EED-4AA6-8705-B5C443C8AA0F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestApp.AspNetCore.3.1", "test\TestApp.AspNetCore.3.1\TestApp.AspNetCore.3.1.csproj", "{F2F81E76-6A0E-466B-B673-EBBF1A9ED075}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Adapter.StackExchangeRedis", "src\OpenTelemetry.Adapter.StackExchangeRedis\OpenTelemetry.Adapter.StackExchangeRedis.csproj", "{6B681D72-D68A-44CC-8C75-53B9A322E6EC}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.StackExchangeRedis", "src\OpenTelemetry.Instrumentation.StackExchangeRedis\OpenTelemetry.Instrumentation.StackExchangeRedis.csproj", "{6B681D72-D68A-44CC-8C75-53B9A322E6EC}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Adapter.StackExchangeRedis.Tests", "test\OpenTelemetry.Adapter.StackExchangeRedis.Tests\OpenTelemetry.Adapter.StackExchangeRedis.Tests.csproj", "{CA98AF29-0852-4ADD-A66B-7E96266EE7B7}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.StackExchangeRedis.Tests", "test\OpenTelemetry.Instrumentation.StackExchangeRedis.Tests\OpenTelemetry.Instrumentation.StackExchangeRedis.Tests.csproj", "{CA98AF29-0852-4ADD-A66B-7E96266EE7B7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{E359BB2B-9AEC-497D-B321-7DF2450C3B8E}"
EndProject
@@ -104,11 +104,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.Zipk
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTelemetry.Exporter.AspNet.Win", "samples\Exporters\AspNet\OpenTelemetry.Exporter.AspNet.Win.csproj", "{9A4E3A68-904B-4835-A3C8-F664B73098DB}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Adapter.AspNet.Win", "src\OpenTelemetry.Adapter.AspNet\OpenTelemetry.Adapter.AspNet.Win.csproj", "{B9EEACDD-CAFA-4B75-A18D-898E7DE21B17}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.AspNet.Win", "src\OpenTelemetry.Instrumentation.AspNet.Win\OpenTelemetry.Instrumentation.AspNet.Win.csproj", "{B9EEACDD-CAFA-4B75-A18D-898E7DE21B17}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Adapter.AspNet.Tests.Win", "test\OpenTelemetry.Adapter.AspNet.Tests\OpenTelemetry.Adapter.AspNet.Tests.Win.csproj", "{55CBAADE-7040-46D6-A845-F207B4F0E281}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Instrumentation.AspNet.Tests.Win", "test\OpenTelemetry.Instrumentation.AspNet.Tests.Win\OpenTelemetry.Instrumentation.AspNet.Tests.Win.csproj", "{55CBAADE-7040-46D6-A845-F207B4F0E281}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests", "test\OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests\OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj", "{7C4026CA-6434-4762-8B77-D657EAEE1325}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests", "test\OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests\OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj", "{7C4026CA-6434-4762-8B77-D657EAEE1325}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -128,10 +128,6 @@ Global
{7EDAE7FA-B44E-42CA-80FA-7DF2FAA2C5DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7EDAE7FA-B44E-42CA-80FA-7DF2FAA2C5DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7EDAE7FA-B44E-42CA-80FA-7DF2FAA2C5DD}.Release|Any CPU.Build.0 = Release|Any CPU
- {4493F5D9-874E-4FBF-B2F3-37890BD910E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4493F5D9-874E-4FBF-B2F3-37890BD910E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4493F5D9-874E-4FBF-B2F3-37890BD910E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4493F5D9-874E-4FBF-B2F3-37890BD910E0}.Release|Any CPU.Build.0 = Release|Any CPU
{99F8A331-05E9-45A5-89BA-4C54E825E5B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{99F8A331-05E9-45A5-89BA-4C54E825E5B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{99F8A331-05E9-45A5-89BA-4C54E825E5B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -160,10 +156,6 @@ Global
{F2F81E76-6A0E-466B-B673-EBBF1A9ED075}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2F81E76-6A0E-466B-B673-EBBF1A9ED075}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2F81E76-6A0E-466B-B673-EBBF1A9ED075}.Release|Any CPU.Build.0 = Release|Any CPU
- {1FA1F509-7722-48E3-9A35-16CBB6774957}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1FA1F509-7722-48E3-9A35-16CBB6774957}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1FA1F509-7722-48E3-9A35-16CBB6774957}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1FA1F509-7722-48E3-9A35-16CBB6774957}.Release|Any CPU.Build.0 = Release|Any CPU
{6B681D72-D68A-44CC-8C75-53B9A322E6EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B681D72-D68A-44CC-8C75-53B9A322E6EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B681D72-D68A-44CC-8C75-53B9A322E6EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/samples/Exporters/AspNet/Global.asax.cs b/samples/Exporters/AspNet/Global.asax.cs
index 70ab6f67a05..2e6ada6c367 100644
--- a/samples/Exporters/AspNet/Global.asax.cs
+++ b/samples/Exporters/AspNet/Global.asax.cs
@@ -20,8 +20,8 @@ protected void Application_Start()
c.AgentHost = "localhost";
c.AgentPort = 6831;
})
- .AddRequestAdapter()
- .AddDependencyAdapter();
+ .AddRequestInstrumentation()
+ .AddDependencyInstrumentation();
});
GlobalConfiguration.Configure(WebApiConfig.Register);
diff --git a/samples/Exporters/AspNet/OpenTelemetry.Exporter.AspNet.Win.csproj b/samples/Exporters/AspNet/OpenTelemetry.Exporter.AspNet.Win.csproj
index 4c4e3a0ff24..7d9ffa6b6d2 100644
--- a/samples/Exporters/AspNet/OpenTelemetry.Exporter.AspNet.Win.csproj
+++ b/samples/Exporters/AspNet/OpenTelemetry.Exporter.AspNet.Win.csproj
@@ -84,13 +84,13 @@
{99f8a331-05e9-45a5-89ba-4c54e825e5b2}
OpenTelemetry.Api
-
+
{b9eeacdd-cafa-4b75-a18d-898e7de21b17}
- OpenTelemetry.Adapter.AspNet.Win
+ OpenTelemetry.Instrumentation.AspNet.Win
-
+
{d3ffbc59-2486-4f8f-bff1-fa95c84929e1}
- OpenTelemetry.Adapter.Dependencies
+ OpenTelemetry.Instrumentation.Dependencies
{8d47e3cf-9ae3-42fe-9084-feb72d9ad769}
@@ -111,8 +111,8 @@
-
-
+
+
$(BuildDependsOn)
diff --git a/samples/Exporters/Console/Exporters.csproj b/samples/Exporters/Console/Exporters.csproj
index a45eb44b2e1..a7411ee9597 100644
--- a/samples/Exporters/Console/Exporters.csproj
+++ b/samples/Exporters/Console/Exporters.csproj
@@ -17,8 +17,8 @@
-
-
+
+
diff --git a/samples/Exporters/Console/TestHttpClient.cs b/samples/Exporters/Console/TestHttpClient.cs
index dec173f315f..4b725788a8d 100644
--- a/samples/Exporters/Console/TestHttpClient.cs
+++ b/samples/Exporters/Console/TestHttpClient.cs
@@ -28,7 +28,7 @@ internal static object Run()
using var tracerFactory = TracerFactory.Create(builder => builder
.UseZipkin(o => o.ServiceName = "http-client-test")
- .AddDependencyAdapter());
+ .AddDependencyInstrumentation());
var tracer = tracerFactory.GetTracer("http-client-test");
using (tracer.StartActiveSpan("incoming request", out _))
diff --git a/samples/Exporters/Console/TestRedis.cs b/samples/Exporters/Console/TestRedis.cs
index 40b48db5d09..3ec3f344806 100644
--- a/samples/Exporters/Console/TestRedis.cs
+++ b/samples/Exporters/Console/TestRedis.cs
@@ -16,7 +16,7 @@
using System;
using System.Collections.Generic;
using System.Threading;
-using OpenTelemetry.Adapter.StackExchangeRedis;
+using OpenTelemetry.Instrumentation.StackExchangeRedis;
using OpenTelemetry.Trace;
using OpenTelemetry.Trace.Configuration;
using StackExchange.Redis;
@@ -37,11 +37,11 @@ internal static object Run(string zipkinUri)
o.ServiceName = "redis-test";
o.Endpoint = new Uri(zipkinUri);
})
- .AddAdapter(t =>
+ .AddInstrumentation(t =>
{
- var adapter = new StackExchangeRedisCallsAdapter(t);
- connection.RegisterProfiler(adapter.GetProfilerSessionsFactory());
- return adapter;
+ var instrumentation = new StackExchangeRedisCallsInstrumentation(t);
+ connection.RegisterProfiler(instrumentation.GetProfilerSessionsFactory());
+ return instrumentation;
}));
var tracer = tracerFactory.GetTracer("redis-test");
diff --git a/samples/Exporters/Web/OpenTelemetry.Exporter.Web.csproj b/samples/Exporters/Web/OpenTelemetry.Exporter.Web.csproj
index 5647a047d75..ee116bb9aee 100644
--- a/samples/Exporters/Web/OpenTelemetry.Exporter.Web.csproj
+++ b/samples/Exporters/Web/OpenTelemetry.Exporter.Web.csproj
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/samples/Exporters/Web/Startup.cs b/samples/Exporters/Web/Startup.cs
index da5a4a77bfc..a30a3b0ec75 100644
--- a/samples/Exporters/Web/Startup.cs
+++ b/samples/Exporters/Web/Startup.cs
@@ -45,8 +45,8 @@ public void ConfigureServices(IServiceCollection services)
options.ServiceName = "test-zipkin";
options.Endpoint = new Uri(this.Configuration.GetValue("Zipkin:Endpoint"));
})
- .AddRequestAdapter()
- .AddDependencyAdapter();
+ .AddRequestInstrumentation()
+ .AddDependencyInstrumentation();
});
}
diff --git a/samples/LoggingTracer/LoggingTracer.Demo.AspNetCore/LoggingTracer.Demo.AspNetCore.csproj b/samples/LoggingTracer/LoggingTracer.Demo.AspNetCore/LoggingTracer.Demo.AspNetCore.csproj
index b50e843fb70..6740a6bddb5 100644
--- a/samples/LoggingTracer/LoggingTracer.Demo.AspNetCore/LoggingTracer.Demo.AspNetCore.csproj
+++ b/samples/LoggingTracer/LoggingTracer.Demo.AspNetCore/LoggingTracer.Demo.AspNetCore.csproj
@@ -10,9 +10,9 @@
-
+
-
+
diff --git a/samples/LoggingTracer/LoggingTracer.Demo.AspNetCore/Startup.cs b/samples/LoggingTracer/LoggingTracer.Demo.AspNetCore/Startup.cs
index ab9e5468c9a..15b88b0e5b8 100644
--- a/samples/LoggingTracer/LoggingTracer.Demo.AspNetCore/Startup.cs
+++ b/samples/LoggingTracer/LoggingTracer.Demo.AspNetCore/Startup.cs
@@ -9,8 +9,8 @@ namespace LoggingTracer.Demo.AspNetCore
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
- using OpenTelemetry.Adapter.AspNetCore;
- using OpenTelemetry.Adapter.Dependencies;
+ using OpenTelemetry.Instrumentation.AspNetCore;
+ using OpenTelemetry.Instrumentation.Dependencies;
public class Startup
{
@@ -21,8 +21,8 @@ public void ConfigureServices(IServiceCollection services)
var tracerFactory = new LoggingTracerFactory();
var tracer = tracerFactory.GetTracer("ServerApp", "semver:1.0.0");
- var dependenciesAdapter = new DependenciesAdapter(tracerFactory);
- var aspNetCoreAdapter = new AspNetCoreAdapter(tracer);
+ var dependenciesInstrumentation = new DependenciesInstrumentation(tracerFactory);
+ var aspNetCoreInstrumentation = new AspNetCoreInstrumentation(tracer);
return tracerFactory;
});
diff --git a/src/OpenTelemetry.Adapter.Dependencies/DependenciesAdapter.cs b/src/OpenTelemetry.Adapter.Dependencies/DependenciesAdapter.cs
deleted file mode 100644
index ec0032be4eb..00000000000
--- a/src/OpenTelemetry.Adapter.Dependencies/DependenciesAdapter.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-// Copyright The OpenTelemetry Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-using System;
-using System.Collections.Generic;
-using OpenTelemetry.Trace;
-
-namespace OpenTelemetry.Adapter.Dependencies
-{
- ///
- /// Instrumentation adaptor that automatically collect calls to Http, SQL, and Azure SDK.
- ///
- public class DependenciesAdapter : IDisposable
- {
- private readonly List adapters = new List();
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// Tracer factory to get a tracer from.
- /// Http configuration options.
- /// Sql configuration options.
- public DependenciesAdapter(TracerFactoryBase tracerFactory, HttpClientAdapterOptions httpOptions = null, SqlClientAdapterOptions sqlOptions = null)
- {
- if (tracerFactory == null)
- {
- throw new ArgumentNullException(nameof(tracerFactory));
- }
-
- var assemblyVersion = typeof(DependenciesAdapter).Assembly.GetName().Version;
-
- var httpClientListener = new HttpClientAdapter(tracerFactory.GetTracer(nameof(HttpClientAdapter), "semver:" + assemblyVersion), httpOptions ?? new HttpClientAdapterOptions());
- var httpWebRequestAdapter = new HttpWebRequestAdapter(tracerFactory.GetTracer(nameof(HttpWebRequestAdapter), "semver:" + assemblyVersion), httpOptions ?? new HttpClientAdapterOptions());
- var azureClientsListener = new AzureClientsAdapter(tracerFactory.GetTracer(nameof(AzureClientsAdapter), "semver:" + assemblyVersion));
- var azurePipelineListener = new AzurePipelineAdapter(tracerFactory.GetTracer(nameof(AzurePipelineAdapter), "semver:" + assemblyVersion));
- var sqlClientListener = new SqlClientAdapter(tracerFactory.GetTracer(nameof(AzurePipelineAdapter), "semver:" + assemblyVersion), sqlOptions ?? new SqlClientAdapterOptions());
-
- this.adapters.Add(httpClientListener);
- this.adapters.Add(httpWebRequestAdapter);
- this.adapters.Add(azureClientsListener);
- this.adapters.Add(azurePipelineListener);
- this.adapters.Add(sqlClientListener);
- }
-
- ///
- public void Dispose()
- {
- foreach (var adapter in this.adapters)
- {
- adapter.Dispose();
- }
- }
- }
-}
diff --git a/src/OpenTelemetry.Extensions.Hosting/Implementation/TelemetryFactoryHostedService.cs b/src/OpenTelemetry.Extensions.Hosting/Implementation/TelemetryFactoryHostedService.cs
index ddec5d7433c..8c3605c98a2 100644
--- a/src/OpenTelemetry.Extensions.Hosting/Implementation/TelemetryFactoryHostedService.cs
+++ b/src/OpenTelemetry.Extensions.Hosting/Implementation/TelemetryFactoryHostedService.cs
@@ -35,7 +35,7 @@ public TelemetryFactoryHostedService(IServiceProvider serviceProvider)
public Task StartAsync(CancellationToken cancellationToken)
{
// Ensure the factory was created when the app starts.
- // This will create and start any configured adapters.
+ // This will create and start any configured instrumentations.
this.serviceProvider.GetRequiredService();
return Task.CompletedTask;
diff --git a/src/OpenTelemetry.Adapter.AspNet/AspNetAdapter.cs b/src/OpenTelemetry.Instrumentation.AspNet.Win/AspNetInstrumentation.cs
similarity index 70%
rename from src/OpenTelemetry.Adapter.AspNet/AspNetAdapter.cs
rename to src/OpenTelemetry.Instrumentation.AspNet.Win/AspNetInstrumentation.cs
index d929dcbc87b..906b9157dd4 100644
--- a/src/OpenTelemetry.Adapter.AspNet/AspNetAdapter.cs
+++ b/src/OpenTelemetry.Instrumentation.AspNet.Win/AspNetInstrumentation.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,35 +14,35 @@
// limitations under the License.
//
using System;
-using OpenTelemetry.Adapter.AspNet.Implementation;
+using OpenTelemetry.Instrumentation.AspNet.Implementation;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter.AspNet
+namespace OpenTelemetry.Instrumentation.AspNet
{
///
- /// Requests adapter.
+ /// Requests instrumentation.
///
- public class AspNetAdapter : IDisposable
+ public class AspNetInstrumentation : IDisposable
{
internal const string AspNetDiagnosticListenerName = "Microsoft.AspNet.TelemetryCorrelation";
private readonly DiagnosticSourceSubscriber diagnosticSourceSubscriber;
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Tracer to record traced with.
- public AspNetAdapter(Tracer tracer)
- : this(tracer, new AspNetAdapterOptions())
+ public AspNetInstrumentation(Tracer tracer)
+ : this(tracer, new AspNetInstrumentationOptions())
{
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Tracer to record traced with.
- /// Configuration options for ASP.NET adapter.
- public AspNetAdapter(Tracer tracer, AspNetAdapterOptions options)
+ /// Configuration options for ASP.NET instrumentation.
+ public AspNetInstrumentation(Tracer tracer, AspNetInstrumentationOptions options)
{
this.diagnosticSourceSubscriber = new DiagnosticSourceSubscriber(
name => new HttpInListener(name, tracer, options),
diff --git a/src/OpenTelemetry.Adapter.AspNet/AspNetAdapterOptions.cs b/src/OpenTelemetry.Instrumentation.AspNet.Win/AspNetInstrumentationOptions.cs
similarity index 84%
rename from src/OpenTelemetry.Adapter.AspNet/AspNetAdapterOptions.cs
rename to src/OpenTelemetry.Instrumentation.AspNet.Win/AspNetInstrumentationOptions.cs
index ea049ebb0a4..7538298403d 100644
--- a/src/OpenTelemetry.Adapter.AspNet/AspNetAdapterOptions.cs
+++ b/src/OpenTelemetry.Instrumentation.AspNet.Win/AspNetInstrumentationOptions.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,12 +18,12 @@
using System.Web;
using OpenTelemetry.Context.Propagation;
-namespace OpenTelemetry.Adapter.AspNet
+namespace OpenTelemetry.Instrumentation.AspNet
{
///
- /// Options for requests adapter.
+ /// Options for requests instrumentation.
///
- public class AspNetAdapterOptions
+ public class AspNetInstrumentationOptions
{
///
/// Gets or sets for context propagation.
diff --git a/src/OpenTelemetry.Adapter.Dependencies/AssemblyInfo.cs b/src/OpenTelemetry.Instrumentation.AspNet.Win/AssemblyInfo.cs
similarity index 60%
rename from src/OpenTelemetry.Adapter.Dependencies/AssemblyInfo.cs
rename to src/OpenTelemetry.Instrumentation.AspNet.Win/AssemblyInfo.cs
index fe67bbc785e..a1332ffde0d 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/AssemblyInfo.cs
+++ b/src/OpenTelemetry.Instrumentation.AspNet.Win/AssemblyInfo.cs
@@ -13,11 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-
using System.Runtime.CompilerServices;
#if SIGNED
-[assembly: InternalsVisibleTo("OpenTelemetry.Adapter.Dependencies.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")]
+[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.AspNet.Tests.Win, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")]
#else
-[assembly: InternalsVisibleTo("OpenTelemetry.Adapter.Dependencies.Tests")]
+[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.AspNet.Tests.Win")]
#endif
diff --git a/src/OpenTelemetry.Adapter.AspNet/Implementation/HttpInListener.cs b/src/OpenTelemetry.Instrumentation.AspNet.Win/Implementation/HttpInListener.cs
similarity index 89%
rename from src/OpenTelemetry.Adapter.AspNet/Implementation/HttpInListener.cs
rename to src/OpenTelemetry.Instrumentation.AspNet.Win/Implementation/HttpInListener.cs
index 5d6f07b3550..2c86ac5dade 100644
--- a/src/OpenTelemetry.Adapter.AspNet/Implementation/HttpInListener.cs
+++ b/src/OpenTelemetry.Instrumentation.AspNet.Win/Implementation/HttpInListener.cs
@@ -21,15 +21,15 @@
using OpenTelemetry.Context.Propagation;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter.AspNet.Implementation
+namespace OpenTelemetry.Instrumentation.AspNet.Implementation
{
internal class HttpInListener : ListenerHandler
{
private readonly PropertyFetcher routeFetcher = new PropertyFetcher("Route");
private readonly PropertyFetcher routeTemplateFetcher = new PropertyFetcher("RouteTemplate");
- private readonly AspNetAdapterOptions options;
+ private readonly AspNetInstrumentationOptions options;
- public HttpInListener(string name, Tracer tracer, AspNetAdapterOptions options)
+ public HttpInListener(string name, Tracer tracer, AspNetInstrumentationOptions options)
: base(name, tracer)
{
this.options = options ?? throw new ArgumentNullException(nameof(options));
@@ -42,13 +42,13 @@ public override void OnStartActivity(Activity activity, object payload)
var context = HttpContext.Current;
if (context == null)
{
- AdapterEventSource.Log.NullPayload(nameof(HttpInListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullPayload(nameof(HttpInListener) + EventNameSuffix);
return;
}
if (this.options.RequestFilter != null && !this.options.RequestFilter(context))
{
- AdapterEventSource.Log.RequestIsFilteredOut(activity.OperationName);
+ InstrumentationEventSource.Log.RequestIsFilteredOut(activity.OperationName);
return;
}
@@ -90,7 +90,7 @@ public override void OnStopActivity(Activity activity, object payload)
if (span == null || !span.Context.IsValid)
{
- AdapterEventSource.Log.NullOrBlankSpan(nameof(HttpInListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullOrBlankSpan(nameof(HttpInListener) + EventNameSuffix);
return;
}
@@ -99,7 +99,7 @@ public override void OnStopActivity(Activity activity, object payload)
var context = HttpContext.Current;
if (context == null)
{
- AdapterEventSource.Log.NullPayload(nameof(HttpInListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullPayload(nameof(HttpInListener) + EventNameSuffix);
return;
}
diff --git a/src/OpenTelemetry.Adapter.AspNet/Implementation/PropertyFetcher.cs b/src/OpenTelemetry.Instrumentation.AspNet.Win/Implementation/PropertyFetcher.cs
similarity index 98%
rename from src/OpenTelemetry.Adapter.AspNet/Implementation/PropertyFetcher.cs
rename to src/OpenTelemetry.Instrumentation.AspNet.Win/Implementation/PropertyFetcher.cs
index 1dc6abce438..1373f62695a 100644
--- a/src/OpenTelemetry.Adapter.AspNet/Implementation/PropertyFetcher.cs
+++ b/src/OpenTelemetry.Instrumentation.AspNet.Win/Implementation/PropertyFetcher.cs
@@ -17,7 +17,7 @@
using System.Linq;
using System.Reflection;
-namespace OpenTelemetry.Adapter.AspNet.Implementation
+namespace OpenTelemetry.Instrumentation.AspNet.Implementation
{
internal class PropertyFetcher
{
diff --git a/src/OpenTelemetry.Adapter.AspNet/OpenTelemetry.Adapter.AspNet.Win.csproj b/src/OpenTelemetry.Instrumentation.AspNet.Win/OpenTelemetry.Instrumentation.AspNet.Win.csproj
similarity index 76%
rename from src/OpenTelemetry.Adapter.AspNet/OpenTelemetry.Adapter.AspNet.Win.csproj
rename to src/OpenTelemetry.Instrumentation.AspNet.Win/OpenTelemetry.Instrumentation.AspNet.Win.csproj
index 7287ae9c78a..3aeab26ff3e 100644
--- a/src/OpenTelemetry.Adapter.AspNet/OpenTelemetry.Adapter.AspNet.Win.csproj
+++ b/src/OpenTelemetry.Instrumentation.AspNet.Win/OpenTelemetry.Instrumentation.AspNet.Win.csproj
@@ -1,8 +1,8 @@
net46
- OpenTelemetry adapter for ASP.NET requests.
- OpenTelemetry.Adapter.AspNet
+ OpenTelemetry instrumentation for ASP.NET requests.
+ OpenTelemetry.Instrumentation.AspNet
$(PackageTags);distributed-tracing;AspNet;MVC;WebAPI
diff --git a/src/OpenTelemetry.Adapter.AspNet/README.md b/src/OpenTelemetry.Instrumentation.AspNet.Win/README.md
similarity index 82%
rename from src/OpenTelemetry.Adapter.AspNet/README.md
rename to src/OpenTelemetry.Instrumentation.AspNet.Win/README.md
index dd550362459..55458b1dc20 100644
--- a/src/OpenTelemetry.Adapter.AspNet/README.md
+++ b/src/OpenTelemetry.Instrumentation.AspNet.Win/README.md
@@ -1,8 +1,8 @@
-# ASP.NET adapter
+# ASP.NET Instrumentation
Configuration with ASP.NET (Full .NET Framework) running in IIS or IIS Express (if supported) to collect incoming request information.
-1. Add a reference to the `OpenTelemetry.Adapter.AspNet` package. Add any other adapters & exporters you will need.
+1. Add a reference to the `OpenTelemetry.Instrumentation.AspNet` package. Add any other instrumentations & exporters you will need.
2. Add the Microsoft telemetry module in your `Web.config`:
@@ -31,8 +31,8 @@ Configuration with ASP.NET (Full .NET Framework) running in IIS or IIS Express (
c.AgentHost = "localhost";
c.AgentPort = 6831;
})
- .AddRequestAdapter()
- .AddDependencyAdapter();
+ .AddRequestInstrumentation()
+ .AddDependencyInstrumentation();
});
}
protected void Application_End()
diff --git a/src/OpenTelemetry.Adapter.AspNetCore/TracerBuilderExtensions.cs b/src/OpenTelemetry.Instrumentation.AspNet.Win/TracerBuilderExtensions.cs
similarity index 79%
rename from src/OpenTelemetry.Adapter.AspNetCore/TracerBuilderExtensions.cs
rename to src/OpenTelemetry.Instrumentation.AspNet.Win/TracerBuilderExtensions.cs
index a3a5ec3e0de..1666fd51dcc 100644
--- a/src/OpenTelemetry.Adapter.AspNetCore/TracerBuilderExtensions.cs
+++ b/src/OpenTelemetry.Instrumentation.AspNet.Win/TracerBuilderExtensions.cs
@@ -15,7 +15,7 @@
//
using System;
-using OpenTelemetry.Adapter.AspNetCore;
+using OpenTelemetry.Instrumentation.AspNet;
namespace OpenTelemetry.Trace.Configuration
{
@@ -29,14 +29,14 @@ public static class TracerBuilderExtensions
///
/// Trace builder to use.
/// The instance of to chain the calls.
- public static TracerBuilder AddRequestAdapter(this TracerBuilder builder)
+ public static TracerBuilder AddRequestInstrumentation(this TracerBuilder builder)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
- return builder.AddAdapter(t => new AspNetCoreAdapter(t));
+ return builder.AddInstrumentation(t => new AspNetInstrumentation(t));
}
///
@@ -45,7 +45,7 @@ public static TracerBuilder AddRequestAdapter(this TracerBuilder builder)
/// Trace builder to use.
/// Configuration options.
/// The instance of to chain the calls.
- public static TracerBuilder AddRequestAdapter(this TracerBuilder builder, Action configure)
+ public static TracerBuilder AddRequestInstrumentation(this TracerBuilder builder, Action configure)
{
if (builder == null)
{
@@ -57,10 +57,10 @@ public static TracerBuilder AddRequestAdapter(this TracerBuilder builder, Action
throw new ArgumentNullException(nameof(configure));
}
- var options = new AspNetCoreAdapterOptions();
+ var options = new AspNetInstrumentationOptions();
configure(options);
- return builder.AddAdapter(t => new AspNetCoreAdapter(t, options));
+ return builder.AddInstrumentation(t => new AspNetInstrumentation(t, options));
}
}
}
diff --git a/src/OpenTelemetry.Adapter.AspNetCore/AspNetCoreAdapter.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentation.cs
similarity index 72%
rename from src/OpenTelemetry.Adapter.AspNetCore/AspNetCoreAdapter.cs
rename to src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentation.cs
index 3f6e2952015..d7f67589ff7 100644
--- a/src/OpenTelemetry.Adapter.AspNetCore/AspNetCoreAdapter.cs
+++ b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentation.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,33 +14,33 @@
// limitations under the License.
//
using System;
-using OpenTelemetry.Adapter.AspNetCore.Implementation;
+using OpenTelemetry.Instrumentation.AspNetCore.Implementation;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter.AspNetCore
+namespace OpenTelemetry.Instrumentation.AspNetCore
{
///
- /// Requests adapter.
+ /// Requests instrumentation.
///
- public class AspNetCoreAdapter : IDisposable
+ public class AspNetCoreInstrumentation : IDisposable
{
private readonly DiagnosticSourceSubscriber diagnosticSourceSubscriber;
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Tracer to record traced with.
- public AspNetCoreAdapter(Tracer tracer)
- : this(tracer, new AspNetCoreAdapterOptions())
+ public AspNetCoreInstrumentation(Tracer tracer)
+ : this(tracer, new AspNetCoreInstrumentationOptions())
{
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Tracer to record traced with.
- /// Configuration options for ASP.NET Core adapter.
- public AspNetCoreAdapter(Tracer tracer, AspNetCoreAdapterOptions options)
+ /// Configuration options for ASP.NET Core instrumentation.
+ public AspNetCoreInstrumentation(Tracer tracer, AspNetCoreInstrumentationOptions options)
{
this.diagnosticSourceSubscriber = new DiagnosticSourceSubscriber(new HttpInListener("Microsoft.AspNetCore", tracer, options), null);
this.diagnosticSourceSubscriber.Subscribe();
diff --git a/src/OpenTelemetry.Adapter.AspNetCore/AspNetCoreAdapterOptions.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentationOptions.cs
similarity index 84%
rename from src/OpenTelemetry.Adapter.AspNetCore/AspNetCoreAdapterOptions.cs
rename to src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentationOptions.cs
index 8f103daa6b8..687774be972 100644
--- a/src/OpenTelemetry.Adapter.AspNetCore/AspNetCoreAdapterOptions.cs
+++ b/src/OpenTelemetry.Instrumentation.AspNetCore/AspNetCoreInstrumentationOptions.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,12 +18,12 @@
using Microsoft.AspNetCore.Http;
using OpenTelemetry.Context.Propagation;
-namespace OpenTelemetry.Adapter.AspNetCore
+namespace OpenTelemetry.Instrumentation.AspNetCore
{
///
- /// Options for requests adapter.
+ /// Options for requests instrumentation.
///
- public class AspNetCoreAdapterOptions
+ public class AspNetCoreInstrumentationOptions
{
///
/// Gets or sets for context propagation.
diff --git a/src/OpenTelemetry.Adapter.AspNet/AssemblyInfo.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/AssemblyInfo.cs
similarity index 60%
rename from src/OpenTelemetry.Adapter.AspNet/AssemblyInfo.cs
rename to src/OpenTelemetry.Instrumentation.AspNetCore/AssemblyInfo.cs
index a02f16af91a..8dd4826ded0 100644
--- a/src/OpenTelemetry.Adapter.AspNet/AssemblyInfo.cs
+++ b/src/OpenTelemetry.Instrumentation.AspNetCore/AssemblyInfo.cs
@@ -16,7 +16,7 @@
using System.Runtime.CompilerServices;
#if SIGNED
-[assembly: InternalsVisibleTo("OpenTelemetry.Adapter.AspNet.Tests.Win, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")]
+[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.AspNetCore.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")]
#else
-[assembly: InternalsVisibleTo("OpenTelemetry.Adapter.AspNet.Tests.Win")]
+[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.AspNetCore.Tests")]
#endif
diff --git a/src/OpenTelemetry.Adapter.AspNetCore/Implementation/HttpInListener.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs
similarity index 91%
rename from src/OpenTelemetry.Adapter.AspNetCore/Implementation/HttpInListener.cs
rename to src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs
index 51b6a0878e3..689d9a47183 100644
--- a/src/OpenTelemetry.Adapter.AspNetCore/Implementation/HttpInListener.cs
+++ b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs
@@ -23,7 +23,7 @@
using OpenTelemetry.Context.Propagation;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter.AspNetCore.Implementation
+namespace OpenTelemetry.Instrumentation.AspNetCore.Implementation
{
internal class HttpInListener : ListenerHandler
{
@@ -34,9 +34,9 @@ internal class HttpInListener : ListenerHandler
private readonly PropertyFetcher beforeActionAttributeRouteInfoFetcher = new PropertyFetcher("AttributeRouteInfo");
private readonly PropertyFetcher beforeActionTemplateFetcher = new PropertyFetcher("Template");
private readonly bool hostingSupportsW3C = false;
- private readonly AspNetCoreAdapterOptions options;
+ private readonly AspNetCoreInstrumentationOptions options;
- public HttpInListener(string name, Tracer tracer, AspNetCoreAdapterOptions options)
+ public HttpInListener(string name, Tracer tracer, AspNetCoreInstrumentationOptions options)
: base(name, tracer)
{
this.hostingSupportsW3C = typeof(HttpRequest).Assembly.GetName().Version.Major >= 3;
@@ -50,13 +50,13 @@ public override void OnStartActivity(Activity activity, object payload)
if (context == null)
{
- AdapterEventSource.Log.NullPayload(nameof(HttpInListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullPayload(nameof(HttpInListener) + EventNameSuffix);
return;
}
if (this.options.RequestFilter != null && !this.options.RequestFilter(context))
{
- AdapterEventSource.Log.RequestIsFilteredOut(activity.OperationName);
+ InstrumentationEventSource.Log.RequestIsFilteredOut(activity.OperationName);
return;
}
@@ -99,7 +99,7 @@ public override void OnStopActivity(Activity activity, object payload)
if (span == null || !span.Context.IsValid)
{
- AdapterEventSource.Log.NullOrBlankSpan(nameof(HttpInListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullOrBlankSpan(nameof(HttpInListener) + EventNameSuffix);
return;
}
@@ -107,7 +107,7 @@ public override void OnStopActivity(Activity activity, object payload)
{
if (!(this.stopContextFetcher.Fetch(payload) is HttpContext context))
{
- AdapterEventSource.Log.NullPayload(nameof(HttpInListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullPayload(nameof(HttpInListener) + EventNameSuffix);
return;
}
@@ -127,7 +127,7 @@ public override void OnCustom(string name, Activity activity, object payload)
if (span == null)
{
- AdapterEventSource.Log.NullOrBlankSpan(name);
+ InstrumentationEventSource.Log.NullOrBlankSpan(name);
return;
}
diff --git a/src/OpenTelemetry.Adapter.AspNetCore/Implementation/PropertyFetcher.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/PropertyFetcher.cs
similarity index 98%
rename from src/OpenTelemetry.Adapter.AspNetCore/Implementation/PropertyFetcher.cs
rename to src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/PropertyFetcher.cs
index 9f7c2ec1e63..c1b980a8d27 100644
--- a/src/OpenTelemetry.Adapter.AspNetCore/Implementation/PropertyFetcher.cs
+++ b/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/PropertyFetcher.cs
@@ -17,7 +17,7 @@
using System.Linq;
using System.Reflection;
-namespace OpenTelemetry.Adapter.AspNetCore.Implementation
+namespace OpenTelemetry.Instrumentation.AspNetCore.Implementation
{
internal class PropertyFetcher
{
diff --git a/src/OpenTelemetry.Adapter.AspNetCore/OpenTelemetry.Adapter.AspNetCore.csproj b/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj
similarity index 84%
rename from src/OpenTelemetry.Adapter.AspNetCore/OpenTelemetry.Adapter.AspNetCore.csproj
rename to src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj
index c5d2a13ddb7..0a05054d513 100644
--- a/src/OpenTelemetry.Adapter.AspNetCore/OpenTelemetry.Adapter.AspNetCore.csproj
+++ b/src/OpenTelemetry.Instrumentation.AspNetCore/OpenTelemetry.Instrumentation.AspNetCore.csproj
@@ -1,7 +1,7 @@
netstandard2.0
- OpenTelemetry adapter for ASP.NET Core requests.
+ OpenTelemetry instrumentation for ASP.NET Core requests.
$(PackageTags);distributed-tracing;AspNetCore
diff --git a/src/OpenTelemetry.Adapter.AspNet/TracerBuilderExtensions.cs b/src/OpenTelemetry.Instrumentation.AspNetCore/TracerBuilderExtensions.cs
similarity index 79%
rename from src/OpenTelemetry.Adapter.AspNet/TracerBuilderExtensions.cs
rename to src/OpenTelemetry.Instrumentation.AspNetCore/TracerBuilderExtensions.cs
index 4adf8857228..916f3416804 100644
--- a/src/OpenTelemetry.Adapter.AspNet/TracerBuilderExtensions.cs
+++ b/src/OpenTelemetry.Instrumentation.AspNetCore/TracerBuilderExtensions.cs
@@ -15,7 +15,7 @@
//
using System;
-using OpenTelemetry.Adapter.AspNet;
+using OpenTelemetry.Instrumentation.AspNetCore;
namespace OpenTelemetry.Trace.Configuration
{
@@ -29,14 +29,14 @@ public static class TracerBuilderExtensions
///
/// Trace builder to use.
/// The instance of to chain the calls.
- public static TracerBuilder AddRequestAdapter(this TracerBuilder builder)
+ public static TracerBuilder AddRequestInstrumentation(this TracerBuilder builder)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
- return builder.AddAdapter(t => new AspNetAdapter(t));
+ return builder.AddInstrumentation(t => new AspNetCoreInstrumentation(t));
}
///
@@ -45,7 +45,7 @@ public static TracerBuilder AddRequestAdapter(this TracerBuilder builder)
/// Trace builder to use.
/// Configuration options.
/// The instance of to chain the calls.
- public static TracerBuilder AddRequestAdapter(this TracerBuilder builder, Action configure)
+ public static TracerBuilder AddRequestInstrumentation(this TracerBuilder builder, Action configure)
{
if (builder == null)
{
@@ -57,10 +57,10 @@ public static TracerBuilder AddRequestAdapter(this TracerBuilder builder, Action
throw new ArgumentNullException(nameof(configure));
}
- var options = new AspNetAdapterOptions();
+ var options = new AspNetCoreInstrumentationOptions();
configure(options);
- return builder.AddAdapter(t => new AspNetAdapter(t, options));
+ return builder.AddInstrumentation(t => new AspNetCoreInstrumentation(t, options));
}
}
}
diff --git a/src/OpenTelemetry.Adapter.AspNetCore/AssemblyInfo.cs b/src/OpenTelemetry.Instrumentation.Dependencies/AssemblyInfo.cs
similarity index 60%
rename from src/OpenTelemetry.Adapter.AspNetCore/AssemblyInfo.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/AssemblyInfo.cs
index e2eb1333e04..a8a642f3835 100644
--- a/src/OpenTelemetry.Adapter.AspNetCore/AssemblyInfo.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/AssemblyInfo.cs
@@ -13,10 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
+
using System.Runtime.CompilerServices;
#if SIGNED
-[assembly: InternalsVisibleTo("OpenTelemetry.Adapter.AspNetCore.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")]
+[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.Dependencies.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010051c1562a090fb0c9f391012a32198b5e5d9a60e9b80fa2d7b434c9e5ccb7259bd606e66f9660676afc6692b8cdc6793d190904551d2103b7b22fa636dcbb8208839785ba402ea08fc00c8f1500ccef28bbf599aa64ffb1e1d5dc1bf3420a3777badfe697856e9d52070a50c3ea5821c80bef17ca3acffa28f89dd413f096f898")]
#else
-[assembly: InternalsVisibleTo("OpenTelemetry.Adapter.AspNetCore.Tests")]
+[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.Dependencies.Tests")]
#endif
diff --git a/src/OpenTelemetry.Adapter.Dependencies/AzureClientsAdapter.cs b/src/OpenTelemetry.Instrumentation.Dependencies/AzureClientsInstrumentation.cs
similarity index 81%
rename from src/OpenTelemetry.Adapter.Dependencies/AzureClientsAdapter.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/AzureClientsInstrumentation.cs
index a1ca87e9805..864abb000d5 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/AzureClientsAdapter.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/AzureClientsInstrumentation.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,20 +16,20 @@
using System;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter.Dependencies
+namespace OpenTelemetry.Instrumentation.Dependencies
{
///
- /// Dependencies adapter.
+ /// Dependencies instrumentation.
///
- public class AzureClientsAdapter : IDisposable
+ public class AzureClientsInstrumentation : IDisposable
{
private readonly DiagnosticSourceSubscriber diagnosticSourceSubscriber;
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Tracer to record traced with.
- public AzureClientsAdapter(Tracer tracer)
+ public AzureClientsInstrumentation(Tracer tracer)
{
this.diagnosticSourceSubscriber = new DiagnosticSourceSubscriber(
name => new AzureSdkDiagnosticListener(name, tracer),
diff --git a/src/OpenTelemetry.Adapter.Dependencies/AzurePipelineAdapter.cs b/src/OpenTelemetry.Instrumentation.Dependencies/AzurePipelineInstrumentation.cs
similarity index 79%
rename from src/OpenTelemetry.Adapter.Dependencies/AzurePipelineAdapter.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/AzurePipelineInstrumentation.cs
index fdce312ac38..5983fed196b 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/AzurePipelineAdapter.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/AzurePipelineInstrumentation.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,20 +16,20 @@
using System;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter.Dependencies
+namespace OpenTelemetry.Instrumentation.Dependencies
{
///
- /// Dependencies adapter.
+ /// Dependencies instrumentation.
///
- public class AzurePipelineAdapter : IDisposable
+ public class AzurePipelineInstrumentation : IDisposable
{
private readonly DiagnosticSourceSubscriber diagnosticSourceSubscriber;
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Tracer to record traced with.
- public AzurePipelineAdapter(Tracer tracer)
+ public AzurePipelineInstrumentation(Tracer tracer)
{
this.diagnosticSourceSubscriber = new DiagnosticSourceSubscriber(new AzureSdkDiagnosticListener("Azure.Pipeline", tracer), null);
this.diagnosticSourceSubscriber.Subscribe();
diff --git a/src/OpenTelemetry.Adapter.Dependencies/Constants.cs b/src/OpenTelemetry.Instrumentation.Dependencies/Constants.cs
similarity index 85%
rename from src/OpenTelemetry.Adapter.Dependencies/Constants.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/Constants.cs
index c0440076591..54652a51072 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/Constants.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/Constants.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,7 +14,7 @@
// limitations under the License.
//
-namespace OpenTelemetry.Adapter.Dependencies
+namespace OpenTelemetry.Instrumentation.Dependencies
{
internal static class Constants
{
diff --git a/src/OpenTelemetry.Instrumentation.Dependencies/DependenciesInstrumentation.cs b/src/OpenTelemetry.Instrumentation.Dependencies/DependenciesInstrumentation.cs
new file mode 100644
index 00000000000..03c427186d6
--- /dev/null
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/DependenciesInstrumentation.cs
@@ -0,0 +1,66 @@
+//
+// Copyright The OpenTelemetry Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+using System;
+using System.Collections.Generic;
+using OpenTelemetry.Trace;
+
+namespace OpenTelemetry.Instrumentation.Dependencies
+{
+ ///
+ /// Instrumentation adaptor that automatically collect calls to Http, SQL, and Azure SDK.
+ ///
+ public class DependenciesInstrumentation : IDisposable
+ {
+ private readonly List instrumentations = new List();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Tracer factory to get a tracer from.
+ /// Http configuration options.
+ /// Sql configuration options.
+ public DependenciesInstrumentation(TracerFactoryBase tracerFactory, HttpClientInstrumentationOptions httpOptions = null, SqlClientInstrumentationOptions sqlOptions = null)
+ {
+ if (tracerFactory == null)
+ {
+ throw new ArgumentNullException(nameof(tracerFactory));
+ }
+
+ var assemblyVersion = typeof(DependenciesInstrumentation).Assembly.GetName().Version;
+
+ var httpClientListener = new HttpClientInstrumentation(tracerFactory.GetTracer(nameof(HttpClientInstrumentation), "semver:" + assemblyVersion), httpOptions ?? new HttpClientInstrumentationOptions());
+ var httpWebRequestInstrumentation = new HttpWebRequestInstrumentation(tracerFactory.GetTracer(nameof(HttpWebRequestInstrumentation), "semver:" + assemblyVersion), httpOptions ?? new HttpClientInstrumentationOptions());
+ var azureClientsListener = new AzureClientsInstrumentation(tracerFactory.GetTracer(nameof(AzureClientsInstrumentation), "semver:" + assemblyVersion));
+ var azurePipelineListener = new AzurePipelineInstrumentation(tracerFactory.GetTracer(nameof(AzurePipelineInstrumentation), "semver:" + assemblyVersion));
+ var sqlClientListener = new SqlClientInstrumentation(tracerFactory.GetTracer(nameof(AzurePipelineInstrumentation), "semver:" + assemblyVersion), sqlOptions ?? new SqlClientInstrumentationOptions());
+
+ this.instrumentations.Add(httpClientListener);
+ this.instrumentations.Add(httpWebRequestInstrumentation);
+ this.instrumentations.Add(azureClientsListener);
+ this.instrumentations.Add(azurePipelineListener);
+ this.instrumentations.Add(sqlClientListener);
+ }
+
+ ///
+ public void Dispose()
+ {
+ foreach (var instrumentation in this.instrumentations)
+ {
+ instrumentation.Dispose();
+ }
+ }
+ }
+}
diff --git a/src/OpenTelemetry.Adapter.Dependencies/HttpClientAdapter.cs b/src/OpenTelemetry.Instrumentation.Dependencies/HttpClientInstrumentation.cs
similarity index 72%
rename from src/OpenTelemetry.Adapter.Dependencies/HttpClientAdapter.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/HttpClientInstrumentation.cs
index 02d98c53990..3f7ace26058 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/HttpClientAdapter.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/HttpClientInstrumentation.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,34 +14,33 @@
// limitations under the License.
//
using System;
-using OpenTelemetry.Adapter.Dependencies.Implementation;
-using OpenTelemetry.Context.Propagation;
+using OpenTelemetry.Instrumentation.Dependencies.Implementation;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter.Dependencies
+namespace OpenTelemetry.Instrumentation.Dependencies
{
///
- /// Dependencies adapter.
+ /// Dependencies instrumentation.
///
- public class HttpClientAdapter : IDisposable
+ public class HttpClientInstrumentation : IDisposable
{
private readonly DiagnosticSourceSubscriber diagnosticSourceSubscriber;
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Tracer to record traced with.
- public HttpClientAdapter(Tracer tracer)
- : this(tracer, new HttpClientAdapterOptions())
+ public HttpClientInstrumentation(Tracer tracer)
+ : this(tracer, new HttpClientInstrumentationOptions())
{
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Tracer to record traced with.
- /// Configuration options for dependencies adapter.
- public HttpClientAdapter(Tracer tracer, HttpClientAdapterOptions options)
+ /// Configuration options for dependencies instrumentation.
+ public HttpClientInstrumentation(Tracer tracer, HttpClientInstrumentationOptions options)
{
this.diagnosticSourceSubscriber = new DiagnosticSourceSubscriber(new HttpHandlerDiagnosticListener(tracer, options), options.EventFilter);
this.diagnosticSourceSubscriber.Subscribe();
diff --git a/src/OpenTelemetry.Adapter.Dependencies/HttpClientAdapterOptions.cs b/src/OpenTelemetry.Instrumentation.Dependencies/HttpClientInstrumentationOptions.cs
similarity index 88%
rename from src/OpenTelemetry.Adapter.Dependencies/HttpClientAdapterOptions.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/HttpClientInstrumentationOptions.cs
index b7506a1ea24..b75484d725e 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/HttpClientAdapterOptions.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/HttpClientInstrumentationOptions.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,29 +16,29 @@
using System;
using System.Net;
using System.Net.Http;
-using OpenTelemetry.Adapter.Dependencies.Implementation;
using OpenTelemetry.Context.Propagation;
+using OpenTelemetry.Instrumentation.Dependencies.Implementation;
-namespace OpenTelemetry.Adapter.Dependencies
+namespace OpenTelemetry.Instrumentation.Dependencies
{
///
- /// Options for dependencies adapter.
+ /// Options for dependencies instrumentation.
///
- public class HttpClientAdapterOptions
+ public class HttpClientInstrumentationOptions
{
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public HttpClientAdapterOptions()
+ public HttpClientInstrumentationOptions()
{
this.EventFilter = DefaultFilter;
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Custom filtering predicate for DiagnosticSource events, if any.
- internal HttpClientAdapterOptions(Func eventFilter)
+ internal HttpClientInstrumentationOptions(Func eventFilter)
{
// TODO This API is unusable and likely to change, let's not expose it for now.
diff --git a/src/OpenTelemetry.Adapter.Dependencies/HttpWebRequestAdapter.net461.cs b/src/OpenTelemetry.Instrumentation.Dependencies/HttpWebRequestInstrumentation.net461.cs
similarity index 72%
rename from src/OpenTelemetry.Adapter.Dependencies/HttpWebRequestAdapter.net461.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/HttpWebRequestInstrumentation.net461.cs
index ed0f12b2802..b492ca9c616 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/HttpWebRequestAdapter.net461.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/HttpWebRequestInstrumentation.net461.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,35 +14,35 @@
// limitations under the License.
//
using System;
-using OpenTelemetry.Adapter.Dependencies.Implementation;
+using OpenTelemetry.Instrumentation.Dependencies.Implementation;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter.Dependencies
+namespace OpenTelemetry.Instrumentation.Dependencies
{
///
- /// Dependencies adapter.
+ /// Dependencies instrumentation.
///
- public class HttpWebRequestAdapter : IDisposable
+ public class HttpWebRequestInstrumentation : IDisposable
{
#if NET461
private readonly DiagnosticSourceSubscriber diagnosticSourceSubscriber;
#endif
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Tracer to record traced with.
- public HttpWebRequestAdapter(Tracer tracer)
- : this(tracer, new HttpClientAdapterOptions())
+ public HttpWebRequestInstrumentation(Tracer tracer)
+ : this(tracer, new HttpClientInstrumentationOptions())
{
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Tracer to record traced with.
- /// Configuration options for HttpWebRequest adapter.
- public HttpWebRequestAdapter(Tracer tracer, HttpClientAdapterOptions options)
+ /// Configuration options for HttpWebRequest instrumentation.
+ public HttpWebRequestInstrumentation(Tracer tracer, HttpClientInstrumentationOptions options)
{
#if NET461
GC.KeepAlive(HttpWebRequestDiagnosticSource.Instance);
diff --git a/src/OpenTelemetry.Adapter.Dependencies/Implementation/AzureSdkDiagnosticListener.cs b/src/OpenTelemetry.Instrumentation.Dependencies/Implementation/AzureSdkDiagnosticListener.cs
similarity index 93%
rename from src/OpenTelemetry.Adapter.Dependencies/Implementation/AzureSdkDiagnosticListener.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/Implementation/AzureSdkDiagnosticListener.cs
index 099d019ac06..4fa6ba35372 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/Implementation/AzureSdkDiagnosticListener.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/Implementation/AzureSdkDiagnosticListener.cs
@@ -17,10 +17,10 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
-using OpenTelemetry.Adapter.Dependencies.Implementation;
+using OpenTelemetry.Instrumentation.Dependencies.Implementation;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter.Dependencies
+namespace OpenTelemetry.Instrumentation.Dependencies
{
internal class AzureSdkDiagnosticListener : ListenerHandler
{
@@ -94,7 +94,7 @@ public override void OnStopActivity(Activity current, object valueValue)
{
if (span == null || !span.Context.IsValid)
{
- AdapterEventSource.Log.NullOrBlankSpan(this.SourceName + ".OnStopActivity");
+ InstrumentationEventSource.Log.NullOrBlankSpan(this.SourceName + ".OnStopActivity");
return;
}
@@ -118,7 +118,7 @@ public override void OnException(Activity current, object valueValue)
if (span == null || !span.Context.IsValid)
{
- AdapterEventSource.Log.NullOrBlankSpan(this.SourceName + ".OnException");
+ InstrumentationEventSource.Log.NullOrBlankSpan(this.SourceName + ".OnException");
return;
}
diff --git a/src/OpenTelemetry.Adapter.Dependencies/Implementation/HttpHandlerDiagnosticListener.cs b/src/OpenTelemetry.Instrumentation.Dependencies/Implementation/HttpHandlerDiagnosticListener.cs
similarity index 92%
rename from src/OpenTelemetry.Adapter.Dependencies/Implementation/HttpHandlerDiagnosticListener.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/Implementation/HttpHandlerDiagnosticListener.cs
index ac38d85d015..e37f828f83c 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/Implementation/HttpHandlerDiagnosticListener.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/Implementation/HttpHandlerDiagnosticListener.cs
@@ -24,7 +24,7 @@
using OpenTelemetry.Context.Propagation;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter.Dependencies.Implementation
+namespace OpenTelemetry.Instrumentation.Dependencies.Implementation
{
internal class HttpHandlerDiagnosticListener : ListenerHandler
{
@@ -35,9 +35,9 @@ internal class HttpHandlerDiagnosticListener : ListenerHandler
private readonly PropertyFetcher stopExceptionFetcher = new PropertyFetcher("Exception");
private readonly PropertyFetcher stopRequestStatusFetcher = new PropertyFetcher("RequestTaskStatus");
private readonly bool httpClientSupportsW3C = false;
- private readonly HttpClientAdapterOptions options;
+ private readonly HttpClientInstrumentationOptions options;
- public HttpHandlerDiagnosticListener(Tracer tracer, HttpClientAdapterOptions options)
+ public HttpHandlerDiagnosticListener(Tracer tracer, HttpClientInstrumentationOptions options)
: base("HttpHandlerDiagnosticListener", tracer)
{
var framework = Assembly
@@ -63,7 +63,7 @@ public override void OnStartActivity(Activity activity, object payload)
const string EventNameSuffix = ".OnStartActivity";
if (!(this.startRequestFetcher.Fetch(payload) is HttpRequestMessage request))
{
- AdapterEventSource.Log.NullPayload(nameof(HttpHandlerDiagnosticListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullPayload(nameof(HttpHandlerDiagnosticListener) + EventNameSuffix);
return;
}
@@ -102,7 +102,7 @@ public override void OnStopActivity(Activity activity, object payload)
{
if (span == null || !span.Context.IsValid)
{
- AdapterEventSource.Log.NullOrBlankSpan(nameof(HttpHandlerDiagnosticListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullOrBlankSpan(nameof(HttpHandlerDiagnosticListener) + EventNameSuffix);
return;
}
@@ -146,7 +146,7 @@ public override void OnException(Activity activity, object payload)
if (span == null || !span.Context.IsValid)
{
- AdapterEventSource.Log.NullOrBlankSpan(nameof(HttpHandlerDiagnosticListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullOrBlankSpan(nameof(HttpHandlerDiagnosticListener) + EventNameSuffix);
return;
}
@@ -154,7 +154,7 @@ public override void OnException(Activity activity, object payload)
{
if (!(this.stopExceptionFetcher.Fetch(payload) is Exception exc))
{
- AdapterEventSource.Log.NullPayload(nameof(HttpHandlerDiagnosticListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullPayload(nameof(HttpHandlerDiagnosticListener) + EventNameSuffix);
return;
}
diff --git a/src/OpenTelemetry.Adapter.Dependencies/Implementation/HttpWebRequestDiagnosticListener.net461.cs b/src/OpenTelemetry.Instrumentation.Dependencies/Implementation/HttpWebRequestDiagnosticListener.net461.cs
similarity index 90%
rename from src/OpenTelemetry.Adapter.Dependencies/Implementation/HttpWebRequestDiagnosticListener.net461.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/Implementation/HttpWebRequestDiagnosticListener.net461.cs
index 021f4f11713..816ef5e6628 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/Implementation/HttpWebRequestDiagnosticListener.net461.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/Implementation/HttpWebRequestDiagnosticListener.net461.cs
@@ -20,16 +20,16 @@
using OpenTelemetry.Context.Propagation;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter.Dependencies.Implementation
+namespace OpenTelemetry.Instrumentation.Dependencies.Implementation
{
internal class HttpWebRequestDiagnosticListener : ListenerHandler
{
private readonly PropertyFetcher startRequestFetcher = new PropertyFetcher("Request");
private readonly PropertyFetcher stopResponseFetcher = new PropertyFetcher("Response");
private readonly PropertyFetcher stopExceptionFetcher = new PropertyFetcher("Exception");
- private readonly HttpClientAdapterOptions options;
+ private readonly HttpClientInstrumentationOptions options;
- public HttpWebRequestDiagnosticListener(Tracer tracer, HttpClientAdapterOptions options)
+ public HttpWebRequestDiagnosticListener(Tracer tracer, HttpClientInstrumentationOptions options)
: base(HttpWebRequestDiagnosticSource.DiagnosticListenerName, tracer)
{
this.options = options;
@@ -40,7 +40,7 @@ public override void OnStartActivity(Activity activity, object payload)
const string EventNameSuffix = ".OnStartActivity";
if (!(this.startRequestFetcher.Fetch(payload) is HttpWebRequest request))
{
- AdapterEventSource.Log.NullPayload(nameof(HttpWebRequestDiagnosticListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullPayload(nameof(HttpWebRequestDiagnosticListener) + EventNameSuffix);
return;
}
@@ -73,7 +73,7 @@ public override void OnStopActivity(Activity activity, object payload)
{
if (span == null || !span.Context.IsValid)
{
- AdapterEventSource.Log.NullOrBlankSpan(nameof(HttpWebRequestDiagnosticListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullOrBlankSpan(nameof(HttpWebRequestDiagnosticListener) + EventNameSuffix);
return;
}
@@ -99,7 +99,7 @@ public override void OnException(Activity activity, object payload)
{
if (span == null || !span.Context.IsValid)
{
- AdapterEventSource.Log.NullOrBlankSpan(nameof(HttpWebRequestDiagnosticListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullOrBlankSpan(nameof(HttpWebRequestDiagnosticListener) + EventNameSuffix);
return;
}
@@ -107,7 +107,7 @@ public override void OnException(Activity activity, object payload)
{
if (!(this.stopExceptionFetcher.Fetch(payload) is Exception exc))
{
- AdapterEventSource.Log.NullPayload(nameof(HttpWebRequestDiagnosticListener) + EventNameSuffix);
+ InstrumentationEventSource.Log.NullPayload(nameof(HttpWebRequestDiagnosticListener) + EventNameSuffix);
return;
}
diff --git a/src/OpenTelemetry.Adapter.Dependencies/Implementation/HttpWebRequestDiagnosticSource.net461.cs b/src/OpenTelemetry.Instrumentation.Dependencies/Implementation/HttpWebRequestDiagnosticSource.net461.cs
similarity index 99%
rename from src/OpenTelemetry.Adapter.Dependencies/Implementation/HttpWebRequestDiagnosticSource.net461.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/Implementation/HttpWebRequestDiagnosticSource.net461.cs
index 34465b2b2e2..82a8297d90f 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/Implementation/HttpWebRequestDiagnosticSource.net461.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/Implementation/HttpWebRequestDiagnosticSource.net461.cs
@@ -23,7 +23,7 @@
using System.Reflection.Emit;
using System.Text;
-namespace OpenTelemetry.Adapter.Dependencies.Implementation
+namespace OpenTelemetry.Instrumentation.Dependencies.Implementation
{
///
/// Hooks into the class reflectively and writes diagnostic events as requests are processed.
diff --git a/src/OpenTelemetry.Adapter.Dependencies/Implementation/PropertyFetcher.cs b/src/OpenTelemetry.Instrumentation.Dependencies/Implementation/PropertyFetcher.cs
similarity index 98%
rename from src/OpenTelemetry.Adapter.Dependencies/Implementation/PropertyFetcher.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/Implementation/PropertyFetcher.cs
index 65942ca19e0..db90919fd25 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/Implementation/PropertyFetcher.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/Implementation/PropertyFetcher.cs
@@ -17,7 +17,7 @@
using System.Linq;
using System.Reflection;
-namespace OpenTelemetry.Adapter.Dependencies.Implementation
+namespace OpenTelemetry.Instrumentation.Dependencies.Implementation
{
internal class PropertyFetcher
{
diff --git a/src/OpenTelemetry.Adapter.Dependencies/Implementation/SqlClientDiagnosticListener.cs b/src/OpenTelemetry.Instrumentation.Dependencies/Implementation/SqlClientDiagnosticListener.cs
similarity index 91%
rename from src/OpenTelemetry.Adapter.Dependencies/Implementation/SqlClientDiagnosticListener.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/Implementation/SqlClientDiagnosticListener.cs
index 0fd8f6c36c1..46ed0d29459 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/Implementation/SqlClientDiagnosticListener.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/Implementation/SqlClientDiagnosticListener.cs
@@ -18,7 +18,7 @@
using System.Diagnostics;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter.Dependencies.Implementation
+namespace OpenTelemetry.Instrumentation.Dependencies.Implementation
{
internal class SqlClientDiagnosticListener : ListenerHandler
{
@@ -40,9 +40,9 @@ internal class SqlClientDiagnosticListener : ListenerHandler
private readonly PropertyFetcher commandTypeFetcher = new PropertyFetcher("CommandType");
private readonly PropertyFetcher commandTextFetcher = new PropertyFetcher("CommandText");
private readonly PropertyFetcher exceptionFetcher = new PropertyFetcher("Exception");
- private readonly SqlClientAdapterOptions options;
+ private readonly SqlClientInstrumentationOptions options;
- public SqlClientDiagnosticListener(string sourceName, Tracer tracer, SqlClientAdapterOptions options)
+ public SqlClientDiagnosticListener(string sourceName, Tracer tracer, SqlClientInstrumentationOptions options)
: base(sourceName, tracer)
{
this.options = options ?? throw new ArgumentNullException(nameof(options));
@@ -63,7 +63,7 @@ public override void OnCustom(string name, Activity activity, object payload)
if (command == null)
{
- AdapterEventSource.Log.NullPayload($"{nameof(SqlClientDiagnosticListener)}-{name}");
+ InstrumentationEventSource.Log.NullPayload($"{nameof(SqlClientDiagnosticListener)}-{name}");
return;
}
@@ -118,7 +118,7 @@ public override void OnCustom(string name, Activity activity, object payload)
{
if (span == null || !span.Context.IsValid)
{
- AdapterEventSource.Log.NullOrBlankSpan($"{nameof(SqlClientDiagnosticListener)}-{name}");
+ InstrumentationEventSource.Log.NullOrBlankSpan($"{nameof(SqlClientDiagnosticListener)}-{name}");
return;
}
}
@@ -137,7 +137,7 @@ public override void OnCustom(string name, Activity activity, object payload)
{
if (span == null || !span.Context.IsValid)
{
- AdapterEventSource.Log.NullOrBlankSpan($"{nameof(SqlClientDiagnosticListener)}-{name}");
+ InstrumentationEventSource.Log.NullOrBlankSpan($"{nameof(SqlClientDiagnosticListener)}-{name}");
return;
}
@@ -149,7 +149,7 @@ public override void OnCustom(string name, Activity activity, object payload)
}
else
{
- AdapterEventSource.Log.NullPayload($"{nameof(SqlClientDiagnosticListener)}-{name}");
+ InstrumentationEventSource.Log.NullPayload($"{nameof(SqlClientDiagnosticListener)}-{name}");
}
}
}
diff --git a/src/OpenTelemetry.Adapter.Dependencies/OpenTelemetry.Adapter.Dependencies.csproj b/src/OpenTelemetry.Instrumentation.Dependencies/OpenTelemetry.Instrumentation.Dependencies.csproj
similarity index 76%
rename from src/OpenTelemetry.Adapter.Dependencies/OpenTelemetry.Adapter.Dependencies.csproj
rename to src/OpenTelemetry.Instrumentation.Dependencies/OpenTelemetry.Instrumentation.Dependencies.csproj
index 71a514d15c3..aa10f8a4033 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/OpenTelemetry.Adapter.Dependencies.csproj
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/OpenTelemetry.Instrumentation.Dependencies.csproj
@@ -1,7 +1,7 @@
netstandard2.0;net461
- OpenTelemetry adapter for Http, Sql, & Azure dependencies.
+ OpenTelemetry instrumentation for Http, Sql, & Azure dependencies.
$(PackageTags);distributed-tracing;HttpClient
diff --git a/src/OpenTelemetry.Adapter.Dependencies/SqlClientAdapter.cs b/src/OpenTelemetry.Instrumentation.Dependencies/SqlClientInstrumentation.cs
similarity index 75%
rename from src/OpenTelemetry.Adapter.Dependencies/SqlClientAdapter.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/SqlClientInstrumentation.cs
index c3a13755f6f..32e0c6c4c54 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/SqlClientAdapter.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/SqlClientInstrumentation.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,35 +14,35 @@
// limitations under the License.
//
using System;
-using OpenTelemetry.Adapter.Dependencies.Implementation;
+using OpenTelemetry.Instrumentation.Dependencies.Implementation;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter.Dependencies
+namespace OpenTelemetry.Instrumentation.Dependencies
{
///
- /// SqlClient adapter.
+ /// SqlClient instrumentation.
///
- public class SqlClientAdapter : IDisposable
+ public class SqlClientInstrumentation : IDisposable
{
internal const string SqlClientDiagnosticListenerName = "SqlClientDiagnosticListener";
private readonly DiagnosticSourceSubscriber diagnosticSourceSubscriber;
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Tracer to record traced with.
- public SqlClientAdapter(Tracer tracer)
- : this(tracer, new SqlClientAdapterOptions())
+ public SqlClientInstrumentation(Tracer tracer)
+ : this(tracer, new SqlClientInstrumentationOptions())
{
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Tracer to record traced with.
- /// Configuration options for sql adapter.
- public SqlClientAdapter(Tracer tracer, SqlClientAdapterOptions options)
+ /// Configuration options for sql instrumentation.
+ public SqlClientInstrumentation(Tracer tracer, SqlClientInstrumentationOptions options)
{
this.diagnosticSourceSubscriber = new DiagnosticSourceSubscriber(
name => new SqlClientDiagnosticListener(name, tracer, options),
diff --git a/src/OpenTelemetry.Adapter.Dependencies/SqlClientAdapterOptions.cs b/src/OpenTelemetry.Instrumentation.Dependencies/SqlClientInstrumentationOptions.cs
similarity index 65%
rename from src/OpenTelemetry.Adapter.Dependencies/SqlClientAdapterOptions.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/SqlClientInstrumentationOptions.cs
index 7ca1dc059eb..7f495567a98 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/SqlClientAdapterOptions.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/SqlClientInstrumentationOptions.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,27 +15,27 @@
//
using System.Data;
-namespace OpenTelemetry.Adapter.Dependencies
+namespace OpenTelemetry.Instrumentation.Dependencies
{
///
- /// Options for .
+ /// Options for .
///
- public class SqlClientAdapterOptions
+ public class SqlClientInstrumentationOptions
{
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public SqlClientAdapterOptions()
+ public SqlClientInstrumentationOptions()
{
}
///
- /// Gets or sets a value indicating whether or not the should capture the names of commands. Default value: True.
+ /// Gets or sets a value indicating whether or not the should capture the names of commands. Default value: True.
///
public bool CaptureStoredProcedureCommandName { get; set; } = true;
///
- /// Gets or sets a value indicating whether or not the should capture the text of commands. Default value: False.
+ /// Gets or sets a value indicating whether or not the should capture the text of commands. Default value: False.
///
public bool CaptureTextCommandContent { get; set; }
}
diff --git a/src/OpenTelemetry.Adapter.Dependencies/TracerBuilderExtensions.cs b/src/OpenTelemetry.Instrumentation.Dependencies/TracerBuilderExtensions.cs
similarity index 52%
rename from src/OpenTelemetry.Adapter.Dependencies/TracerBuilderExtensions.cs
rename to src/OpenTelemetry.Instrumentation.Dependencies/TracerBuilderExtensions.cs
index 45300d2ac28..0dbde5b00b3 100644
--- a/src/OpenTelemetry.Adapter.Dependencies/TracerBuilderExtensions.cs
+++ b/src/OpenTelemetry.Instrumentation.Dependencies/TracerBuilderExtensions.cs
@@ -15,7 +15,7 @@
//
using System;
-using OpenTelemetry.Adapter.Dependencies;
+using OpenTelemetry.Instrumentation.Dependencies;
namespace OpenTelemetry.Trace.Configuration
{
@@ -29,7 +29,7 @@ public static class TracerBuilderExtensions
///
/// Trace builder to use.
/// The instance of to chain the calls.
- public static TracerBuilder AddDependencyAdapter(this TracerBuilder builder)
+ public static TracerBuilder AddDependencyInstrumentation(this TracerBuilder builder)
{
if (builder == null)
{
@@ -37,42 +37,42 @@ public static TracerBuilder AddDependencyAdapter(this TracerBuilder builder)
}
return builder
- .AddAdapter((t) => new AzureClientsAdapter(t))
- .AddAdapter((t) => new AzurePipelineAdapter(t))
- .AddAdapter((t) => new HttpClientAdapter(t))
- .AddAdapter((t) => new HttpWebRequestAdapter(t))
- .AddAdapter((t) => new SqlClientAdapter(t));
+ .AddInstrumentation((t) => new AzureClientsInstrumentation(t))
+ .AddInstrumentation((t) => new AzurePipelineInstrumentation(t))
+ .AddInstrumentation((t) => new HttpClientInstrumentation(t))
+ .AddInstrumentation((t) => new HttpWebRequestInstrumentation(t))
+ .AddInstrumentation((t) => new SqlClientInstrumentation(t));
}
///
/// Enables the outgoing requests automatic data collection.
///
/// Trace builder to use.
- /// Http configuration options.
- /// Sql configuration options.
+ /// Http configuration options.
+ /// Sql configuration options.
/// The instance of to chain the calls.
- public static TracerBuilder AddDependencyAdapter(
+ public static TracerBuilder AddDependencyInstrumentation(
this TracerBuilder builder,
- Action configureHttpAdapterOptions = null,
- Action configureSqlAdapterOptions = null)
+ Action configureHttpInstrumentationOptions = null,
+ Action configureSqlInstrumentationOptions = null)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
- var httpOptions = new HttpClientAdapterOptions();
- configureHttpAdapterOptions?.Invoke(httpOptions);
+ var httpOptions = new HttpClientInstrumentationOptions();
+ configureHttpInstrumentationOptions?.Invoke(httpOptions);
- var sqlOptions = new SqlClientAdapterOptions();
- configureSqlAdapterOptions?.Invoke(sqlOptions);
+ var sqlOptions = new SqlClientInstrumentationOptions();
+ configureSqlInstrumentationOptions?.Invoke(sqlOptions);
return builder
- .AddAdapter((t) => new AzureClientsAdapter(t))
- .AddAdapter((t) => new AzurePipelineAdapter(t))
- .AddAdapter((t) => new HttpClientAdapter(t, httpOptions))
- .AddAdapter((t) => new HttpWebRequestAdapter(t, httpOptions))
- .AddAdapter((t) => new SqlClientAdapter(t, sqlOptions));
+ .AddInstrumentation((t) => new AzureClientsInstrumentation(t))
+ .AddInstrumentation((t) => new AzurePipelineInstrumentation(t))
+ .AddInstrumentation((t) => new HttpClientInstrumentation(t, httpOptions))
+ .AddInstrumentation((t) => new HttpWebRequestInstrumentation(t, httpOptions))
+ .AddInstrumentation((t) => new SqlClientInstrumentation(t, sqlOptions));
}
}
}
diff --git a/src/OpenTelemetry.Adapter.StackExchangeRedis/AssemblyInfo.cs b/src/OpenTelemetry.Instrumentation.StackExchangeRedis/AssemblyInfo.cs
similarity index 93%
rename from src/OpenTelemetry.Adapter.StackExchangeRedis/AssemblyInfo.cs
rename to src/OpenTelemetry.Instrumentation.StackExchangeRedis/AssemblyInfo.cs
index 54884fe264f..4ecd381011e 100644
--- a/src/OpenTelemetry.Adapter.StackExchangeRedis/AssemblyInfo.cs
+++ b/src/OpenTelemetry.Instrumentation.StackExchangeRedis/AssemblyInfo.cs
@@ -16,7 +16,7 @@
using System.Runtime.CompilerServices;
-[assembly: InternalsVisibleTo("OpenTelemetry.Adapter.StackExchangeRedis.Tests" + AssemblyInfo.PublicKey)]
+[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.StackExchangeRedis.Tests" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2" + AssemblyInfo.MoqPublicKey)]
#if SIGNED
diff --git a/src/OpenTelemetry.Adapter.StackExchangeRedis/Implementation/RedisProfilerEntryToSpanConverter.cs b/src/OpenTelemetry.Instrumentation.StackExchangeRedis/Implementation/RedisProfilerEntryToSpanConverter.cs
similarity index 97%
rename from src/OpenTelemetry.Adapter.StackExchangeRedis/Implementation/RedisProfilerEntryToSpanConverter.cs
rename to src/OpenTelemetry.Instrumentation.StackExchangeRedis/Implementation/RedisProfilerEntryToSpanConverter.cs
index 68a43f93360..4330621d61b 100644
--- a/src/OpenTelemetry.Adapter.StackExchangeRedis/Implementation/RedisProfilerEntryToSpanConverter.cs
+++ b/src/OpenTelemetry.Instrumentation.StackExchangeRedis/Implementation/RedisProfilerEntryToSpanConverter.cs
@@ -17,7 +17,7 @@
using OpenTelemetry.Trace;
using StackExchange.Redis.Profiling;
-namespace OpenTelemetry.Adapter.StackExchangeRedis.Implementation
+namespace OpenTelemetry.Instrumentation.StackExchangeRedis.Implementation
{
internal static class RedisProfilerEntryToSpanConverter
{
diff --git a/src/OpenTelemetry.Adapter.StackExchangeRedis/OpenTelemetry.Adapter.StackExchangeRedis.csproj b/src/OpenTelemetry.Instrumentation.StackExchangeRedis/OpenTelemetry.Instrumentation.StackExchangeRedis.csproj
similarity index 77%
rename from src/OpenTelemetry.Adapter.StackExchangeRedis/OpenTelemetry.Adapter.StackExchangeRedis.csproj
rename to src/OpenTelemetry.Instrumentation.StackExchangeRedis/OpenTelemetry.Instrumentation.StackExchangeRedis.csproj
index 0dc99bc7184..1ab63633c04 100644
--- a/src/OpenTelemetry.Adapter.StackExchangeRedis/OpenTelemetry.Adapter.StackExchangeRedis.csproj
+++ b/src/OpenTelemetry.Instrumentation.StackExchangeRedis/OpenTelemetry.Instrumentation.StackExchangeRedis.csproj
@@ -1,7 +1,7 @@
netstandard2.0;net461
- OpenTelemetry adapter for Redis calls made by the StackExchange.Redis library.
+ OpenTelemetry instrumentation for Redis calls made by the StackExchange.Redis library.
$(PackageTags);distributed-tracing;Redis;StackExchange.Redis
diff --git a/src/OpenTelemetry.Adapter.StackExchangeRedis/README.md b/src/OpenTelemetry.Instrumentation.StackExchangeRedis/README.md
similarity index 52%
rename from src/OpenTelemetry.Adapter.StackExchangeRedis/README.md
rename to src/OpenTelemetry.Instrumentation.StackExchangeRedis/README.md
index c5f2711b802..5041d6fd12b 100644
--- a/src/OpenTelemetry.Adapter.StackExchangeRedis/README.md
+++ b/src/OpenTelemetry.Instrumentation.StackExchangeRedis/README.md
@@ -1,11 +1,11 @@
-# Using StackExchange.Redis adapter
+# Using StackExchange.Redis instrumentation
Outgoing calls to Redis made using `StackExchange.Redis` library can be automatically tracked.
1. Install package to your project:
- [OpenTelemetry.Adapter.StackExchangeRedis](https://www.nuget.org/packages/OpenTelemetry.Adapter.StackExchangeRedis)
+ [OpenTelemetry.Instrumentation.StackExchangeRedis](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.StackExchangeRedis)
-2. Configure Redis adapter
+2. Configure Redis instrumentation
```csharp
// connect to the server
@@ -15,11 +15,11 @@ Outgoing calls to Redis made using `StackExchange.Redis` library can be automati
.SetSampler(new AlwaysSampleSampler())
.UseZipkin(options => {})
.SetResource(Resources.CreateServiceResource("my-service"))
- .AddAdapter(t =>
+ .AddInstrumentation(t =>
{
- var adapter = new StackExchangeRedisCallsAdapter(t);
- connection.RegisterProfiler(adapter.GetProfilerSessionsFactory());
- return adapter;
+ var instrumentation = new StackExchangeRedisCallsInstrumentation(t);
+ connection.RegisterProfiler(instrumentation.GetProfilerSessionsFactory());
+ return instrumentation;
})))
{
}
diff --git a/src/OpenTelemetry.Adapter.StackExchangeRedis/StackExchangeRedisCallsAdapter.cs b/src/OpenTelemetry.Instrumentation.StackExchangeRedis/StackExchangeRedisCallsInstrumentation.cs
similarity index 92%
rename from src/OpenTelemetry.Adapter.StackExchangeRedis/StackExchangeRedisCallsAdapter.cs
rename to src/OpenTelemetry.Instrumentation.StackExchangeRedis/StackExchangeRedisCallsInstrumentation.cs
index 20019a6768b..b1f738e8ac2 100644
--- a/src/OpenTelemetry.Adapter.StackExchangeRedis/StackExchangeRedisCallsAdapter.cs
+++ b/src/OpenTelemetry.Instrumentation.StackExchangeRedis/StackExchangeRedisCallsInstrumentation.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -19,17 +19,17 @@
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
-using OpenTelemetry.Adapter.StackExchangeRedis.Implementation;
+using OpenTelemetry.Instrumentation.StackExchangeRedis.Implementation;
using OpenTelemetry.Trace;
using OpenTelemetry.Trace.Configuration;
using StackExchange.Redis.Profiling;
-namespace OpenTelemetry.Adapter.StackExchangeRedis
+namespace OpenTelemetry.Instrumentation.StackExchangeRedis
{
///
- /// Redis calls adapter.
+ /// Redis calls instrumentation.
///
- public class StackExchangeRedisCallsAdapter : IDisposable
+ public class StackExchangeRedisCallsInstrumentation : IDisposable
{
private readonly Tracer tracer;
@@ -42,10 +42,10 @@ public class StackExchangeRedisCallsAdapter : IDisposable
private readonly PropertyInfo spanEndTimestampInfo;
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// Tracer to record traced with.
- public StackExchangeRedisCallsAdapter(Tracer tracer)
+ public StackExchangeRedisCallsInstrumentation(Tracer tracer)
{
this.tracer = tracer;
diff --git a/src/OpenTelemetry.Adapter.StackExchangeRedis/StackExchangeRedisCallsAdapterOptions.cs b/src/OpenTelemetry.Instrumentation.StackExchangeRedis/StackExchangeRedisCallsInstrumentationOptions.cs
similarity index 70%
rename from src/OpenTelemetry.Adapter.StackExchangeRedis/StackExchangeRedisCallsAdapterOptions.cs
rename to src/OpenTelemetry.Instrumentation.StackExchangeRedis/StackExchangeRedisCallsInstrumentationOptions.cs
index 3c8b37af51c..ac7989d135a 100644
--- a/src/OpenTelemetry.Adapter.StackExchangeRedis/StackExchangeRedisCallsAdapterOptions.cs
+++ b/src/OpenTelemetry.Instrumentation.StackExchangeRedis/StackExchangeRedisCallsInstrumentationOptions.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,12 +14,12 @@
// limitations under the License.
//
-namespace OpenTelemetry.Adapter.StackExchangeRedis
+namespace OpenTelemetry.Instrumentation.StackExchangeRedis
{
///
- /// Options for dependencies adapter.
+ /// Options for dependencies instrumentation.
///
- public class StackExchangeRedisCallsAdapterOptions
+ public class StackExchangeRedisCallsInstrumentationOptions
{
}
}
diff --git a/src/OpenTelemetry.Shims.OpenTracing/ScopeManagerShim.cs b/src/OpenTelemetry.Shims.OpenTracing/ScopeManagerShim.cs
index 29a9974cf8f..20a25dc4ef1 100644
--- a/src/OpenTelemetry.Shims.OpenTracing/ScopeManagerShim.cs
+++ b/src/OpenTelemetry.Shims.OpenTracing/ScopeManagerShim.cs
@@ -57,7 +57,7 @@ public ScopeManagerShim(Trace.Tracer tracer)
return openTracingScope;
}
- return new ScopeAdapter(currentSpan);
+ return new ScopeInstrumentation(currentSpan);
}
}
@@ -71,7 +71,7 @@ public ScopeManagerShim(Trace.Tracer tracer)
var scope = this.tracer.WithSpan(shim.Span, false);
- var adapter = new ScopeAdapter(
+ var instrumentation = new ScopeInstrumentation(
shim.Span,
() =>
{
@@ -85,19 +85,19 @@ public ScopeManagerShim(Trace.Tracer tracer)
scope.Dispose();
});
- SpanScopeTable.Add(shim.Span, adapter);
+ SpanScopeTable.Add(shim.Span, instrumentation);
#if DEBUG
Interlocked.Increment(ref this.spanScopeTableCount);
#endif
- return adapter;
+ return instrumentation;
}
- private class ScopeAdapter : global::OpenTracing.IScope
+ private class ScopeInstrumentation : global::OpenTracing.IScope
{
private readonly Action disposeAction;
- public ScopeAdapter(TelemetrySpan span, Action disposeAction = null)
+ public ScopeInstrumentation(TelemetrySpan span, Action disposeAction = null)
{
this.Span = new SpanShim(span);
this.disposeAction = disposeAction;
diff --git a/src/OpenTelemetry.Shims.OpenTracing/SpanBuilderShim.cs b/src/OpenTelemetry.Shims.OpenTracing/SpanBuilderShim.cs
index 24564e05650..001ceb007ff 100644
--- a/src/OpenTelemetry.Shims.OpenTracing/SpanBuilderShim.cs
+++ b/src/OpenTelemetry.Shims.OpenTracing/SpanBuilderShim.cs
@@ -50,9 +50,9 @@ public sealed class SpanBuilderShim : ISpanBuilder
private readonly List> attributes = new List>();
///
- /// The set of operation names for System.Diagnostics.Activity based automatic adapters that indicate a root span.
+ /// The set of operation names for System.Diagnostics.Activity based automatic instrumentations that indicate a root span.
///
- private readonly IList rootOperationNamesForActivityBasedAutoAdapters = new List
+ private readonly IList rootOperationNamesForActivityBasedAutoInstrumentations = new List
{
"Microsoft.AspNetCore.Hosting.HttpRequestIn",
};
@@ -78,12 +78,12 @@ public sealed class SpanBuilderShim : ISpanBuilder
private bool error;
- public SpanBuilderShim(Trace.Tracer tracer, string spanName, IList rootOperationNamesForActivityBasedAutoAdapters = null)
+ public SpanBuilderShim(Trace.Tracer tracer, string spanName, IList rootOperationNamesForActivityBasedAutoInstrumentations = null)
{
this.tracer = tracer ?? throw new ArgumentNullException(nameof(tracer));
this.spanName = spanName ?? throw new ArgumentNullException(nameof(spanName));
this.ScopeManager = new ScopeManagerShim(this.tracer);
- this.rootOperationNamesForActivityBasedAutoAdapters = rootOperationNamesForActivityBasedAutoAdapters ?? this.rootOperationNamesForActivityBasedAutoAdapters;
+ this.rootOperationNamesForActivityBasedAutoInstrumentations = rootOperationNamesForActivityBasedAutoInstrumentations ?? this.rootOperationNamesForActivityBasedAutoInstrumentations;
}
private global::OpenTracing.IScopeManager ScopeManager { get; }
@@ -187,7 +187,7 @@ public ISpan Start()
if (System.Diagnostics.Activity.Current != null && System.Diagnostics.Activity.Current.IdFormat == System.Diagnostics.ActivityIdFormat.W3C)
{
var currentActivity = System.Diagnostics.Activity.Current;
- if (this.rootOperationNamesForActivityBasedAutoAdapters.Contains(currentActivity.OperationName))
+ if (this.rootOperationNamesForActivityBasedAutoInstrumentations.Contains(currentActivity.OperationName))
{
this.tracer.StartSpanFromActivity(this.spanName, currentActivity, this.spanKind, this.links);
span = this.tracer.CurrentSpan;
diff --git a/src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs b/src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs
index fb30bb0191c..674c2b661fb 100644
--- a/src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs
+++ b/src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs
@@ -114,7 +114,7 @@ public void Inject(
if ((format == BuiltinFormats.TextMap || format == BuiltinFormats.HttpHeaders) && carrier is ITextMap textMapCarrier)
{
- this.textFormat.Inject(shim.SpanContext, textMapCarrier, (adapter, key, value) => adapter.Set(key, value));
+ this.textFormat.Inject(shim.SpanContext, textMapCarrier, (instrumentation, key, value) => instrumentation.Set(key, value));
}
}
}
diff --git a/src/OpenTelemetry/Adapter/DiagnosticSourceListener.cs b/src/OpenTelemetry/Instrumentation/DiagnosticSourceListener.cs
similarity index 90%
rename from src/OpenTelemetry/Adapter/DiagnosticSourceListener.cs
rename to src/OpenTelemetry/Instrumentation/DiagnosticSourceListener.cs
index a841ad808a5..0b32319c3d3 100644
--- a/src/OpenTelemetry/Adapter/DiagnosticSourceListener.cs
+++ b/src/OpenTelemetry/Instrumentation/DiagnosticSourceListener.cs
@@ -18,7 +18,7 @@
using System.Collections.Generic;
using System.Diagnostics;
-namespace OpenTelemetry.Adapter
+namespace OpenTelemetry.Instrumentation
{
internal class DiagnosticSourceListener : IObserver>
{
@@ -41,7 +41,7 @@ public void OnNext(KeyValuePair value)
{
if (Activity.Current == null)
{
- AdapterEventSource.Log.NullActivity(value.Key);
+ InstrumentationEventSource.Log.NullActivity(value.Key);
return;
}
@@ -66,7 +66,7 @@ public void OnNext(KeyValuePair value)
}
catch (Exception ex)
{
- AdapterEventSource.Log.UnknownErrorProcessingEvent(this.handler?.SourceName, value.Key, ex);
+ InstrumentationEventSource.Log.UnknownErrorProcessingEvent(this.handler?.SourceName, value.Key, ex);
}
}
}
diff --git a/src/OpenTelemetry/Adapter/DiagnosticSourceSubscriber.cs b/src/OpenTelemetry/Instrumentation/DiagnosticSourceSubscriber.cs
similarity index 98%
rename from src/OpenTelemetry/Adapter/DiagnosticSourceSubscriber.cs
rename to src/OpenTelemetry/Instrumentation/DiagnosticSourceSubscriber.cs
index 09955ba9bf2..aa6d7d588a8 100644
--- a/src/OpenTelemetry/Adapter/DiagnosticSourceSubscriber.cs
+++ b/src/OpenTelemetry/Instrumentation/DiagnosticSourceSubscriber.cs
@@ -18,7 +18,7 @@
using System.Diagnostics;
using System.Threading;
-namespace OpenTelemetry.Adapter
+namespace OpenTelemetry.Instrumentation
{
public class DiagnosticSourceSubscriber : IDisposable, IObserver
{
diff --git a/src/OpenTelemetry/Adapter/AdapterEventSource.cs b/src/OpenTelemetry/Instrumentation/InstrumentationEventSource.cs
similarity index 91%
rename from src/OpenTelemetry/Adapter/AdapterEventSource.cs
rename to src/OpenTelemetry/Instrumentation/InstrumentationEventSource.cs
index fd8c5897921..96d69870812 100644
--- a/src/OpenTelemetry/Adapter/AdapterEventSource.cs
+++ b/src/OpenTelemetry/Instrumentation/InstrumentationEventSource.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -19,15 +19,15 @@
using System.Globalization;
using System.Threading;
-namespace OpenTelemetry.Adapter
+namespace OpenTelemetry.Instrumentation
{
///
/// EventSource events emitted from the project.
///
- [EventSource(Name = "OpenTelemetry-Adapter")]
- public class AdapterEventSource : EventSource
+ [EventSource(Name = "OpenTelemetry-Instrumentation")]
+ public class InstrumentationEventSource : EventSource
{
- public static AdapterEventSource Log = new AdapterEventSource();
+ public static InstrumentationEventSource Log = new InstrumentationEventSource();
[NonEvent]
public void ExceptionInCustomSampler(Exception ex)
diff --git a/src/OpenTelemetry/Adapter/ListenerHandler.cs b/src/OpenTelemetry/Instrumentation/ListenerHandler.cs
similarity index 92%
rename from src/OpenTelemetry/Adapter/ListenerHandler.cs
rename to src/OpenTelemetry/Instrumentation/ListenerHandler.cs
index 69970e0a22e..c70694aea33 100644
--- a/src/OpenTelemetry/Adapter/ListenerHandler.cs
+++ b/src/OpenTelemetry/Instrumentation/ListenerHandler.cs
@@ -16,7 +16,7 @@
using System.Diagnostics;
using OpenTelemetry.Trace;
-namespace OpenTelemetry.Adapter
+namespace OpenTelemetry.Instrumentation
{
public abstract class ListenerHandler
{
@@ -38,7 +38,7 @@ public virtual void OnStopActivity(Activity activity, object payload)
if (span == null || !span.Context.IsValid)
{
- AdapterEventSource.Log.NullOrBlankSpan("ListenerHandler.OnStopActivity");
+ InstrumentationEventSource.Log.NullOrBlankSpan("ListenerHandler.OnStopActivity");
return;
}
diff --git a/src/OpenTelemetry/Properties/AssemblyInfo.cs b/src/OpenTelemetry/Properties/AssemblyInfo.cs
index 9aaa67c5946..4c30388d382 100644
--- a/src/OpenTelemetry/Properties/AssemblyInfo.cs
+++ b/src/OpenTelemetry/Properties/AssemblyInfo.cs
@@ -17,9 +17,9 @@
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("OpenTelemetry.Tests" + AssemblyInfo.PublicKey)]
-[assembly: InternalsVisibleTo("OpenTelemetry.Adapter.Dependencies.Tests" + AssemblyInfo.PublicKey)]
-[assembly: InternalsVisibleTo("OpenTelemetry.Adapter.AspNetCore.Tests" + AssemblyInfo.PublicKey)]
-[assembly: InternalsVisibleTo("OpenTelemetry.Adapter.StackExchangeRedis.Tests" + AssemblyInfo.PublicKey)]
+[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.Dependencies.Tests" + AssemblyInfo.PublicKey)]
+[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.AspNetCore.Tests" + AssemblyInfo.PublicKey)]
+[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.StackExchangeRedis.Tests" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2" + AssemblyInfo.MoqPublicKey)]
#if SIGNED
diff --git a/src/OpenTelemetry/Trace/Configuration/TracerBuilder.cs b/src/OpenTelemetry/Trace/Configuration/TracerBuilder.cs
index 180e01955ce..f695cf464c6 100644
--- a/src/OpenTelemetry/Trace/Configuration/TracerBuilder.cs
+++ b/src/OpenTelemetry/Trace/Configuration/TracerBuilder.cs
@@ -37,7 +37,7 @@ internal TracerBuilder()
internal List ProcessingPipelines { get; private set; }
- internal List AdapterFactories { get; private set; }
+ internal List InstrumentationFactories { get; private set; }
///
/// Configures sampler.
@@ -85,30 +85,30 @@ public TracerBuilder AddProcessorPipeline(Action c
}
///
- /// Adds auto-adapters for spans.
+ /// Adds auto-instrumentations for spans.
///
- /// Type of adapter class.
- /// Function that builds adapter from .
+ /// Type of instrumentation class.
+ /// Function that builds instrumentation from .
/// Returns for chaining.
- public TracerBuilder AddAdapter(
- Func adapterFactory)
- where TAdapter : class
+ public TracerBuilder AddInstrumentation(
+ Func instrumentationFactory)
+ where TInstrumentation : class
{
- if (adapterFactory == null)
+ if (instrumentationFactory == null)
{
- throw new ArgumentNullException(nameof(adapterFactory));
+ throw new ArgumentNullException(nameof(instrumentationFactory));
}
- if (this.AdapterFactories == null)
+ if (this.InstrumentationFactories == null)
{
- this.AdapterFactories = new List();
+ this.InstrumentationFactories = new List();
}
- this.AdapterFactories.Add(
- new AdapterFactory(
- typeof(TAdapter).Name,
- "semver:" + typeof(TAdapter).Assembly.GetName().Version,
- adapterFactory));
+ this.InstrumentationFactories.Add(
+ new InstrumentationFactory(
+ typeof(TInstrumentation).Name,
+ "semver:" + typeof(TInstrumentation).Assembly.GetName().Version,
+ instrumentationFactory));
return this;
}
@@ -124,13 +124,13 @@ public TracerBuilder SetTracerOptions(TracerConfiguration options)
return this;
}
- internal readonly struct AdapterFactory
+ internal readonly struct InstrumentationFactory
{
public readonly string Name;
public readonly string Version;
public readonly Func Factory;
- internal AdapterFactory(string name, string version, Func factory)
+ internal InstrumentationFactory(string name, string version, Func factory)
{
this.Name = name;
this.Version = version;
diff --git a/src/OpenTelemetry/Trace/Configuration/TracerFactory.cs b/src/OpenTelemetry/Trace/Configuration/TracerFactory.cs
index 6c46c956f2a..568b712547b 100644
--- a/src/OpenTelemetry/Trace/Configuration/TracerFactory.cs
+++ b/src/OpenTelemetry/Trace/Configuration/TracerFactory.cs
@@ -29,7 +29,7 @@ public class TracerFactory : TracerFactoryBase, IDisposable
{
private readonly object lck = new object();
private readonly Dictionary tracerRegistry = new Dictionary();
- private readonly List