diff --git a/src/AwsLambda/AwsLambdaWrapper/Helpers/ServiceHelpers.cs b/src/AwsLambda/AwsLambdaWrapper/Helpers/ServiceHelpers.cs index eeb42dea7b..fce29772b0 100644 --- a/src/AwsLambda/AwsLambdaWrapper/Helpers/ServiceHelpers.cs +++ b/src/AwsLambda/AwsLambdaWrapper/Helpers/ServiceHelpers.cs @@ -37,11 +37,10 @@ internal static ISpan CreateSpan(KeyValuePair operationPair, str /// internal static ISpan CreateSpan(string operationName, string component, string operation) { - if (string.IsNullOrEmpty(operationName) || string.IsNullOrEmpty(component) || string.IsNullOrEmpty(operation)) - { - Logger.Log("Could not create a span. Creating a span requires an operation name, component, and operation.", true, "ERROR"); - return null; - } + + operationName = string.IsNullOrEmpty(operationName) ? "UNKNOWN" : operationName; + component = string.IsNullOrEmpty(component) ? "UNKNOWN" : component; + operation = string.IsNullOrEmpty(operation) ? "UNKNOWN" : operation; var span = GlobalTracer.Instance.BuildSpan(operationName).Start(); span.SetTag(Tags.SpanKind, Tags.SpanKindClient); diff --git a/src/AwsLambda/CHANGELOG.md b/src/AwsLambda/CHANGELOG.md index f5e9c49af3..c5c99033e9 100644 --- a/src/AwsLambda/CHANGELOG.md +++ b/src/AwsLambda/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### New Features ### Fixes +* Span creation logic has been updated to fall back to using `UNKNOWN` for any missing span name components. The previous behavior was to fail span creation. [#1211](https://github.com/newrelic/newrelic-dotnet-agent/pull/1221) ## [1.3.0] - 2021-07-21 @@ -27,7 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.0.0] - 2019-12-10 ### New Features -* New SDK providing Open Tracing instrumentation for AWS Lambda. Refer to New Relic's AWS Lambda monitoring documentation to get started https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring. +* New SDK providing Open Tracing instrumentation for AWS Lambda. Refer to New Relic's AWS Lambda monitoring documentation to get started https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/get-started/monitoring-aws-lambda-serverless-monitoring/. * **The New Relic AWS Lambda Agent for .NET is now Open Source**
* The New Relic AWS Lambda Agent for .NET is now open source! Now you can view the source code to help with troubleshooting, observe the project roadmap, and file issues directly in the repository. We are now using the [Apache 2 license](/LICENSE). See our [Contributing guide](/CONTRIBUTING.md) and [Code of Conduct](https://opensource.newrelic.com/code-of-conduct/) for details on contributing!