Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto Apto para principiantes
#386 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 6 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
aws, csharp
Área
backend, cloud

Línea de trabajo

Empieza en src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs, en ReadFromEnvironmentalVariables(), e inspecciona la búsqueda de GetEnvironmentalVariable. Elimina el espacio final del nombre de la variable de AWS Lambda y añade pruebas para las variables de AWS y Azure Functions. Ejecuta las pruebas de configuración pertinentes; se considera terminado cuando la variable de AWS habilita ProcessQueueOnCompletedRequest de forma predeterminada, igual que el comportamiento de Azure.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C#
Estrellas
573
Forks
143
Merge medio
5 d 9 h
PR fusionados (30 d)
1

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de exceptionless/Exceptionless.Net

Todos los issues de exceptionless/Exceptionless.Net

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.