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

[bug] Lambda integration fails if no InvokedFunctionArn present #2445

Open
Dreamescaper opened this issue Dec 23, 2024 · 1 comment
Open
Labels
bug Something isn't working comp:instrumentation.awslambda Things related to OpenTelemetry.Instrumentation.AWSLambda

Comments

@Dreamescaper
Copy link

Dreamescaper commented Dec 23, 2024

Component

OpenTelemetry.Instrumentation.AWSLambda

Package Version

Package Name Version
OpenTelemetry.Instrumentation.AWSLambda 1.10.0-beta.3

Runtime Version

net8.0

Description

When I invoke lambda function locally during testing, providing an empty LambdaContext, it fails with the following error:

Error Message:
   System.NullReferenceException : Object reference not set to an instance of an object.
  Stack Trace:
     at OpenTelemetry.Instrumentation.AWSLambda.Implementation.AWSLambdaUtils.GetFaasId(String functionArn)
   at OpenTelemetry.Instrumentation.AWSLambda.Implementation.AWSLambdaUtils.GetFunctionTags[TInput](TInput input, ILambdaContext context, Boolean isColdStart)
   at OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaWrapper.OnFunctionStart[TInput](TInput input, ILambdaContext context, ActivityContext parentContext)
   at OpenTelemetry.Instrumentation.AWSLambda.AWSLambdaWrapper.TraceInternalAsync[TInput,TResult](TracerProvider tracerProvider, Func`3 handlerAsync, TInput input, ILambdaContext context, ActivityContext parentContext)

Additional Context

I realize that it is not nessesseraly a bug, and I probably should add values there. But it didn't happen with 1.10.0-beta.1, and I can see that other methods (apart from GetFaasId, like GetAccountId) do check for functionArn nullabilty, so it probably should happen here as well.

@Dreamescaper Dreamescaper added the bug Something isn't working label Dec 23, 2024
@github-actions github-actions bot added the comp:instrumentation.awslambda Things related to OpenTelemetry.Instrumentation.AWSLambda label Dec 23, 2024
Copy link
Contributor

Tagging component owner(s).

@srprash @ppittle @muhammad-othman @rypdal @Oberon00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working comp:instrumentation.awslambda Things related to OpenTelemetry.Instrumentation.AWSLambda
Projects
None yet
Development

No branches or pull requests

1 participant