AWS Lambda detection never matches because the environment variable name has a trailing space
Mantenedores costumam responder em até 6 dias
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 76/100
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
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
- https://github.com/exceptionless/Exceptionless.Net/blob/5792f00d175f94a35fe0559c8e9999234a8163be/src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs#L496-L506 (the check is on line 500)
- https://github.com/exceptionless/Exceptionless.Net/blob/5792f00d175f94a35fe0559c8e9999234a8163be/src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs#L518-L535 (
GetEnvironmentalVariabledoes an exact, untrimmed key lookup)
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
- Set the environment variable
AWS_LAMBDA_FUNCTION_NAME=testand do not setExceptionless__ProcessQueueOnCompletedRequest. - Create a client and call
client.Configuration.ReadFromEnvironmentalVariables()(orclient.Startup()). client.Configuration.ProcessQueueOnCompletedRequestisfalse. Repeat withFUNCTIONS_WORKER_RUNTIME=dotnetand it istrue.
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
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de exceptionless/Exceptionless.Net
-
Exceptionless.Mvc, Exceptionless.Web and Exceptionless.WebApi readmes link to the old exceptionless.io domainTalvez já em andamento @ejsmith assumiu há 2 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
exceptionless/Exceptionless.Net#391 ·
Mantenedores costumam responder em até 6 dias
-
log4net appenders never flush their client, so events are lost at shutdownTalvez já em andamento @ejsmith assumiu há 2 dias. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
exceptionless/Exceptionless.Net#390 ·
Mantenedores costumam responder em até 6 dias
-
HeartbeatPlugin ignores heartbeat intervals with a seconds component under 30 (uses TimeSpan.Seconds instead of TotalSeconds)Talvez já em andamento @ejsmith assumiu há 2 dias. Abertabug
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
exceptionless/Exceptionless.Net#387 ·
Mantenedores costumam responder em até 6 dias
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 35/100
exceptionless/Exceptionless.Net#389 ·
Mantenedores costumam responder em até 6 dias
-
Queue never retries with a smaller batch after HTTP 413; the whole batch is dropped after the max attemptsTalvez já em andamento @ejsmith assumiu há 2 dias. Abertabug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 72/100
exceptionless/Exceptionless.Net#388 ·
Mantenedores costumam responder em até 6 dias
Todas as issues de exceptionless/Exceptionless.Net
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Facepunch/sbox-public#12305 ·
Mantenedores costumam responder em até 5 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
JiaFeiMiao-K-Cat/DiscImageStudio#205 ·
Mantenedores costumam responder em até 1 dia
-
bug keep-fresh
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Flow-Launcher/Flow.Launcher#4744 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
flyingpie/windows-terminal-quake#419 ·
Mantenedores costumam responder em até 1 dia
-
enhancement help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100