Skip to content

Commit

Permalink
Swapped params
Browse files Browse the repository at this point in the history
  • Loading branch information
cromefire committed Feb 24, 2023
1 parent b7f6156 commit 12ef20c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public OpenTelemetryBuilder ConfigureResource(
/// <returns>The supplied <see cref="OpenTelemetryBuilder"/> for chaining
/// calls.</returns>
public OpenTelemetryBuilder ConfigureResource(
Action<ResourceBuilder, IServiceProvider> configure)
Action<IServiceProvider, ResourceBuilder> configure)
{
Guard.ThrowIfNull(configure);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,13 @@ public static MeterProviderBuilder ConfigureResource(this MeterProviderBuilder m
/// <param name="meterProviderBuilder"><see cref="MeterProviderBuilder"/>.</param>
/// <param name="configure">An action which modifies the provided <see cref="ResourceBuilder"/> in-place.</param>
/// <returns>The supplied <see cref="MeterProviderBuilder"/> for chaining.</returns>
public static MeterProviderBuilder ConfigureResource(this MeterProviderBuilder meterProviderBuilder, Action<ResourceBuilder, IServiceProvider> configure)
public static MeterProviderBuilder ConfigureResource(this MeterProviderBuilder meterProviderBuilder, Action<IServiceProvider, ResourceBuilder> configure)
{
meterProviderBuilder.ConfigureBuilder((sp, builder) =>
{
if (builder is MeterProviderBuilderSdk meterProviderBuilderSdk)
{
meterProviderBuilderSdk.ConfigureResource(resourceBuilder => configure(resourceBuilder, sp));
meterProviderBuilderSdk.ConfigureResource(resourceBuilder => configure(sp, resourceBuilder));
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,15 @@ public static TracerProviderBuilder ConfigureResource(this TracerProviderBuilder
/// <param name="tracerProviderBuilder"><see cref="TracerProviderBuilder"/>.</param>
/// <param name="configure">An action which modifies the provided <see cref="ResourceBuilder"/> in-place.</param>
/// <returns>Returns <see cref="TracerProviderBuilder"/> for chaining.</returns>
public static TracerProviderBuilder ConfigureResource(this TracerProviderBuilder tracerProviderBuilder, Action<ResourceBuilder, IServiceProvider> configure)
public static TracerProviderBuilder ConfigureResource(this TracerProviderBuilder tracerProviderBuilder, Action<IServiceProvider, ResourceBuilder> configure)
{
Guard.ThrowIfNull(configure);

tracerProviderBuilder.ConfigureBuilder((sp, builder) =>
{
if (builder is TracerProviderBuilderSdk tracerProviderBuilderSdk)
{
tracerProviderBuilderSdk.ConfigureResource(traceBuilder => configure(traceBuilder, sp));
tracerProviderBuilderSdk.ConfigureResource(traceBuilder => configure(sp, traceBuilder));
}
});

Expand Down

0 comments on commit 12ef20c

Please sign in to comment.