Skip to content

Commit

Permalink
open-telemetry#894: review suggestions and other improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
rypdal committed Aug 9, 2023
1 parent dabf755 commit 0bfa3ce
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaInstrumentationOptions.SetParen
OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaInstrumentationOptions.SetParentFromBatch.set -> void
OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaWrapper
OpenTelemetry.Instrumentation.AWSLambda.TracerProviderBuilderExtensions
static OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaWrapper.Trace<TInput, TResult>(OpenTelemetry.Trace.TracerProvider! tracerProvider, System.Func<TInput, Amazon.Lambda.Core.ILambdaContext!, TResult>! lambdaHandler, TInput input, Amazon.Lambda.Core.ILambdaContext! context, System.Diagnostics.ActivityContext parentContext = default(System.Diagnostics.ActivityContext)) -> TResult
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.Trace<TInput, TResult>(OpenTelemetry.Trace.TracerProvider? tracerProvider, System.Func<TInput, Amazon.Lambda.Core.ILambdaContext!, TResult>! lambdaHandler, TInput input, Amazon.Lambda.Core.ILambdaContext! context, System.Diagnostics.ActivityContext parentContext = default(System.Diagnostics.ActivityContext)) -> TResult
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) -> OpenTelemetry.Trace.TracerProviderBuilder!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static class AWSLambdaWrapper
/// </param>
/// <returns>Instance of output result.</returns>
public static TResult Trace<TInput, TResult>(
TracerProvider tracerProvider,
TracerProvider? tracerProvider,
Func<TInput, ILambdaContext, TResult> lambdaHandler,
TInput input,
ILambdaContext context,
Expand All @@ -91,7 +91,7 @@ public static TResult Trace<TInput, TResult>(
/// unless X-Ray propagation is disabled in the configuration for this wrapper.
/// </param>
public static void Trace<TInput>(
TracerProvider tracerProvider,
TracerProvider? tracerProvider,
Action<TInput, ILambdaContext> lambdaHandler,
TInput input,
ILambdaContext context,
Expand Down
5 changes: 5 additions & 0 deletions src/OpenTelemetry.Instrumentation.AWSLambda/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

* BREAKING: `ILambdaContext context` argument of all tracing methods of
`OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaWrapper` became nullable.
* Enabled nullable for `OpenTelemetry.Instrumentation.AWSLambda` and `OpenTelemetry.Instrumentation.AWSLambda.Tests`
([#894](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/issues/894))

## 1.2.0-beta.1

Released 2023-Aug-07
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ internal static IEnumerable<KeyValuePair<string, object>> GetHttpTags<TInput>(TI
var hostHeaderV2 = AWSLambdaUtils.GetHeaderValues(requestV2, HeaderHost)?.LastOrDefault();
(hostName, hostPort) = GetHostAndPort(httpScheme, hostHeaderV2);
break;
default:
return tags;
}

tags.AddTagIfNotNull(SemanticConventions.AttributeHttpScheme, httpScheme);
Expand Down

0 comments on commit 0bfa3ce

Please sign in to comment.