Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

AWS Lambda detection never matches because the environment variable name has a trailing space

未关闭 适合新手
#386 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 6 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
aws, csharp
领域
backend, cloud

调研方向

从 src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs 中的 ReadFromEnvironmentalVariables() 开始,检查 GetEnvironmentalVariable 查找逻辑。从 AWS Lambda 变量名中删除末尾空格,并为 AWS 和 Azure Functions 变量都添加测试。运行相关的配置测试;完成的标准是 AWS 变量默认启用 ProcessQueueOnCompletedRequest,与 Azure 的行为一致。

由索引模型根据 Issue 内容生成。

描述

bug

In Exceptionless 6.2.0 (core Exceptionless package), ReadFromEnvironmentalVariables() is meant to turn on ProcessQueueOnCompletedRequest automatically when running in AWS Lambda, but it looks up "AWS_LAMBDA_FUNCTION_NAME " (with a trailing space). No such variable exists, so the Lambda check never fires.

Where

What happens

On AWS Lambda, AWS_LAMBDA_FUNCTION_NAME is set, but the lookup is for AWS_LAMBDA_FUNCTION_NAME , so it returns null. ProcessQueueOnCompletedRequest stays false unless the app sets it explicitly, and the ASP.NET Core middleware does not flush the queue at the end of each request. Lambda freezes the process after the response is sent, so queued events can sit unsent until a later invocation, or be lost when the environment is recycled (see #215 for the original report of this behavior). The Azure Functions check on the next line (FUNCTIONS_WORKER_RUNTIME) works because it has no trailing space.

Expected

When AWS_LAMBDA_FUNCTION_NAME is set and Exceptionless:ProcessQueueOnCompletedRequest is not configured, ProcessQueueOnCompletedRequest is set to true, the same as on Azure Functions.

Steps to reproduce

  1. Set the environment variable AWS_LAMBDA_FUNCTION_NAME=test and do not set Exceptionless__ProcessQueueOnCompletedRequest.
  2. Create a client and call client.Configuration.ReadFromEnvironmentalVariables() (or client.Startup()).
  3. client.Configuration.ProcessQueueOnCompletedRequest is false. Repeat with FUNCTIONS_WORKER_RUNTIME=dotnet and it is true.

Suggested fix

Remove the trailing space: GetEnvironmentalVariable("AWS_LAMBDA_FUNCTION_NAME"), and add a test that covers both serverless variables.

主要语言
C#
星标
573
派生
143
平均合并
5 天 9 小时
30 天内合并 PR
1

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

exceptionless/Exceptionless.Net 的其他 Issue

查看 exceptionless/Exceptionless.Net 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。