Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Aberta Para iniciantes
#386 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 6 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
76/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
aws, csharp
Domínio
backend, cloud

Direção de pesquisa

Comece em src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs, em ReadFromEnvironmentalVariables(), e inspecione a busca de GetEnvironmentalVariable. Remova o espaço no final do nome da variável do AWS Lambda e adicione testes para as variáveis do AWS e do Azure Functions. Execute os testes de configuração relevantes; o trabalho estará concluído quando a variável do AWS habilitar ProcessQueueOnCompletedRequest por padrão, seguindo o comportamento do Azure.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
C#
Estrelas
573
Forks
143
Merge médio
5d 9h
PRs com merge (30d)
1

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de exceptionless/Exceptionless.Net

Todas as issues de exceptionless/Exceptionless.Net

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.