Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Instrumentation.AWSLambda] Remove AddAWSLambdaConfigurations with default parameter #943

Merged
merged 11 commits into from
Mar 13, 2023
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ static OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaWrapper.Trace<TInput, TR
static OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaWrapper.Trace<TInput>(OpenTelemetry.Trace.TracerProvider tracerProvider, System.Action<TInput, Amazon.Lambda.Core.ILambdaContext> lambdaHandler, TInput input, Amazon.Lambda.Core.ILambdaContext context, System.Diagnostics.ActivityContext parentContext = default(System.Diagnostics.ActivityContext)) -> void
static OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaWrapper.TraceAsync<TInput, TResult>(OpenTelemetry.Trace.TracerProvider tracerProvider, System.Func<TInput, Amazon.Lambda.Core.ILambdaContext, System.Threading.Tasks.Task<TResult>> lambdaHandler, TInput input, Amazon.Lambda.Core.ILambdaContext context, System.Diagnostics.ActivityContext parentContext = default(System.Diagnostics.ActivityContext)) -> System.Threading.Tasks.Task<TResult>
static OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaWrapper.TraceAsync<TInput>(OpenTelemetry.Trace.TracerProvider tracerProvider, System.Func<TInput, Amazon.Lambda.Core.ILambdaContext, System.Threading.Tasks.Task> lambdaHandler, TInput input, Amazon.Lambda.Core.ILambdaContext context, System.Diagnostics.ActivityContext parentContext = default(System.Diagnostics.ActivityContext)) -> System.Threading.Tasks.Task
static OpenTelemetry.Instrumentation.AWSLambda.TracerProviderBuilderExtensions.AddAWSLambdaConfigurations(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action<OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaInstrumentationOptions> configure = null) -> OpenTelemetry.Trace.TracerProviderBuilder
static OpenTelemetry.Instrumentation.AWSLambda.TracerProviderBuilderExtensions.AddAWSLambdaConfigurations(this OpenTelemetry.Trace.TracerProviderBuilder builder) -> OpenTelemetry.Trace.TracerProviderBuilder
static OpenTelemetry.Instrumentation.AWSLambda.TracerProviderBuilderExtensions.AddAWSLambdaConfigurations(this OpenTelemetry.Trace.TracerProviderBuilder builder, System.Action<OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaInstrumentationOptions> configure) -> OpenTelemetry.Trace.TracerProviderBuilder
4 changes: 4 additions & 0 deletions src/OpenTelemetry.Instrumentation.AWSLambda/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@

* Add HTTP server span attributes for API Gateway triggers
([#626](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/626))
* Removes `AddAWSLambdaConfigurations` method with default configure parameter.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is confusing because from the user's perspective it is not removed but just replaced with another method. Probably we don't even need a changelog entry here, unless it's really ABI-breaking

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In some strange cases it can be treated as ABI-breaking. https://stackoverflow.com/a/9916197
Most cases it is not.

([#943](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/943))

## 1.1.0-beta.2

Released 2022-Sep-14

Release PR: [#590](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/590)
& [#639](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/639).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ namespace OpenTelemetry.Instrumentation.AWSLambda;
/// </summary>
public static class TracerProviderBuilderExtensions
{
/// <summary>
/// Add AWS Lambda configurations.
/// </summary>
/// <param name="builder"><see cref="TracerProviderBuilder"/> being configured.</param>
/// <returns>The instance of <see cref="TracerProviderBuilder"/> to chain the calls.</returns>
public static TracerProviderBuilder AddAWSLambdaConfigurations(this TracerProviderBuilder builder) =>
AddAWSLambdaConfigurations(builder, configure: null);

/// <summary>
/// Add AWS Lambda configurations.
/// </summary>
Expand All @@ -35,7 +43,7 @@ public static class TracerProviderBuilderExtensions
/// <returns>The instance of <see cref="TracerProviderBuilder"/> to chain the calls.</returns>
public static TracerProviderBuilder AddAWSLambdaConfigurations(
this TracerProviderBuilder builder,
Action<AWSLambdaInstrumentationOptions> configure = null)
Action<AWSLambdaInstrumentationOptions> configure)
{
Guard.ThrowIfNull(builder);

Expand Down