Skip to content

Commit

Permalink
Reduce the public api exposed by OpenTelemetry.Extensions.DependencyI…
Browse files Browse the repository at this point in the history
…njection. (#4001)

Co-authored-by: Utkarsh Umesan Pillai <utpilla@microsoft.com>
  • Loading branch information
CodeBlanch and utpilla authored Dec 10, 2022
1 parent aee29ef commit 045db1b
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 46 deletions.
1 change: 1 addition & 0 deletions src/OpenTelemetry.Api/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("OpenTelemetry" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Extensions.DependencyInjection" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Tests" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Shims.OpenTracing.Tests" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2" + AssemblyInfo.MoqPublicKey)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
OpenTelemetry.Metrics.IConfigureMeterProviderBuilder
OpenTelemetry.Metrics.IConfigureMeterProviderBuilder.ConfigureBuilder(System.IServiceProvider! serviceProvider, OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder) -> void
OpenTelemetry.Metrics.IMeterProviderBuilder
OpenTelemetry.Metrics.IMeterProviderBuilder.ConfigureBuilder(System.Action<System.IServiceProvider!, OpenTelemetry.Metrics.MeterProviderBuilder!>! configure) -> OpenTelemetry.Metrics.MeterProviderBuilder!
OpenTelemetry.Metrics.IMeterProviderBuilder.ConfigureServices(System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection!>! configure) -> OpenTelemetry.Metrics.MeterProviderBuilder!
OpenTelemetry.Metrics.IMeterProviderBuilder.Provider.get -> OpenTelemetry.Metrics.MeterProvider?
OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions
OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMetricsServiceCollectionExtensions
OpenTelemetry.Trace.IConfigureTracerProviderBuilder
OpenTelemetry.Trace.IConfigureTracerProviderBuilder.ConfigureBuilder(System.IServiceProvider! serviceProvider, OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder) -> void
OpenTelemetry.Trace.ITracerProviderBuilder
OpenTelemetry.Trace.ITracerProviderBuilder.ConfigureBuilder(System.Action<System.IServiceProvider!, OpenTelemetry.Trace.TracerProviderBuilder!>! configure) -> OpenTelemetry.Trace.TracerProviderBuilder!
OpenTelemetry.Trace.ITracerProviderBuilder.ConfigureServices(System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection!>! configure) -> OpenTelemetry.Trace.TracerProviderBuilder!
OpenTelemetry.Trace.ITracerProviderBuilder.Provider.get -> OpenTelemetry.Trace.TracerProvider?
OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions
OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracingServiceCollectionExtensions
static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions.AddInstrumentation<T>(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder) -> OpenTelemetry.Metrics.MeterProviderBuilder!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
OpenTelemetry.Metrics.IConfigureMeterProviderBuilder
OpenTelemetry.Metrics.IConfigureMeterProviderBuilder.ConfigureBuilder(System.IServiceProvider! serviceProvider, OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder) -> void
OpenTelemetry.Metrics.IMeterProviderBuilder
OpenTelemetry.Metrics.IMeterProviderBuilder.ConfigureBuilder(System.Action<System.IServiceProvider!, OpenTelemetry.Metrics.MeterProviderBuilder!>! configure) -> OpenTelemetry.Metrics.MeterProviderBuilder!
OpenTelemetry.Metrics.IMeterProviderBuilder.ConfigureServices(System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection!>! configure) -> OpenTelemetry.Metrics.MeterProviderBuilder!
OpenTelemetry.Metrics.IMeterProviderBuilder.Provider.get -> OpenTelemetry.Metrics.MeterProvider?
OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions
OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMetricsServiceCollectionExtensions
OpenTelemetry.Trace.IConfigureTracerProviderBuilder
OpenTelemetry.Trace.IConfigureTracerProviderBuilder.ConfigureBuilder(System.IServiceProvider! serviceProvider, OpenTelemetry.Trace.TracerProviderBuilder! tracerProviderBuilder) -> void
OpenTelemetry.Trace.ITracerProviderBuilder
OpenTelemetry.Trace.ITracerProviderBuilder.ConfigureBuilder(System.Action<System.IServiceProvider!, OpenTelemetry.Trace.TracerProviderBuilder!>! configure) -> OpenTelemetry.Trace.TracerProviderBuilder!
OpenTelemetry.Trace.ITracerProviderBuilder.ConfigureServices(System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection!>! configure) -> OpenTelemetry.Trace.TracerProviderBuilder!
OpenTelemetry.Trace.ITracerProviderBuilder.Provider.get -> OpenTelemetry.Trace.TracerProvider?
OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracerProviderBuilderExtensions
OpenTelemetry.Trace.OpenTelemetryDependencyInjectionTracingServiceCollectionExtensions
static OpenTelemetry.Metrics.OpenTelemetryDependencyInjectionMeterProviderBuilderExtensions.AddInstrumentation<T>(this OpenTelemetry.Metrics.MeterProviderBuilder! meterProviderBuilder) -> OpenTelemetry.Metrics.MeterProviderBuilder!
Expand Down
15 changes: 1 addition & 14 deletions src/OpenTelemetry.Extensions.DependencyInjection/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,5 @@

using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("OpenTelemetry" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Extensions.DependencyInjection.Tests" + AssemblyInfo.PublicKey)]

#if SIGNED
internal static class AssemblyInfo
{
public const string PublicKey = ", PublicKey=002400000480000094000000060200000024000052534131000400000100010051C1562A090FB0C9F391012A32198B5E5D9A60E9B80FA2D7B434C9E5CCB7259BD606E66F9660676AFC6692B8CDC6793D190904551D2103B7B22FA636DCBB8208839785BA402EA08FC00C8F1500CCEF28BBF599AA64FFB1E1D5DC1BF3420A3777BADFE697856E9D52070A50C3EA5821C80BEF17CA3ACFFA28F89DD413F096F898";
public const string MoqPublicKey = ", PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7";
}
#else
internal static class AssemblyInfo
{
public const string PublicKey = "";
public const string MoqPublicKey = "";
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ namespace OpenTelemetry.Metrics;
/// <summary>
/// Represents something that configures the <see cref="MeterProviderBuilder"/> type.
/// </summary>
public interface IConfigureMeterProviderBuilder
// Note: This API may be made public if there is a need for it.
internal interface IConfigureMeterProviderBuilder
{
/// <summary>
/// Invoked to configure a <see cref="MeterProviderBuilder"/> instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ namespace OpenTelemetry.Metrics;
/// <summary>
/// Describes a <see cref="MeterProviderBuilder"/> backed by an <see cref="IServiceCollection"/>.
/// </summary>
public interface IMeterProviderBuilder : IDeferredMeterProviderBuilder
// Note: This API may be made public if there is a need for it.
internal interface IMeterProviderBuilder : IDeferredMeterProviderBuilder
{
/// <summary>
/// Gets the <see cref="MeterProvider"/> being constructed by the builder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
<RunApiCompat>false</RunApiCompat>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(RepoRoot)\src\OpenTelemetry.Api\Internal\Guard.cs" Link="Includes\Guard.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Api\OpenTelemetry.Api.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ namespace OpenTelemetry.Trace;
/// <summary>
/// Represents something that configures the <see cref="TracerProviderBuilder"/> type.
/// </summary>
public interface IConfigureTracerProviderBuilder
// Note: This API may be made public if there is a need for it.
internal interface IConfigureTracerProviderBuilder
{
/// <summary>
/// Invoked to configure a <see cref="TracerProviderBuilder"/> instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ namespace OpenTelemetry.Trace;
/// <summary>
/// Describes a <see cref="TracerProviderBuilder"/> backed by an <see cref="IServiceCollection"/>.
/// </summary>
public interface ITracerProviderBuilder : IDeferredTracerProviderBuilder
// Note: This API may be made public if there is a need for it.
internal interface ITracerProviderBuilder : IDeferredTracerProviderBuilder
{
/// <summary>
/// Gets the <see cref="TracerProvider"/> being constructed by the builder.
Expand Down

0 comments on commit 045db1b

Please sign in to comment.