InfluxDB Backend Listener: Limited error information and missing assertion failure details
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 50/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- java
- Área
- backend, observability-sre
Línea de trabajo
Comienza en src/components/src/main/java/org/apache/jmeter/visualizers/backend/SamplerMetric.java, centrándote en SamplerMetric.add() y en su manejo actual de errores. Reproduce el fallo con una Response Assertion diseñada para fallar y el InfluxDB Backend Listener; después, verifica que los nombres de las assertions, los mensajes de fallo y los errores HTTP estén representados por separado en las métricas reportadas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Expected behavior
When using the InfluxDB Backend Listener, error metrics should capture complete error information including:
- Detailed Assertion Failures: Each failed assertion should be reported with:
- Assertion name (e.g., "Response Assertion", "Duration Assertion")
- Specific failure message (e.g., "Expected to contain 'success' but found 'error'")
- Individual error count for each assertion type
- HTTP Response Failures: Non-assertion failures should report:
- HTTP response codes (e.g., "404", "500")
- Response messages (e.g., "Not Found", "Internal Server Error")
- Comprehensive Error Categorization: Errors should be properly categorized and distinguishable in InfluxDB/Grafana dashboards
Actual behavior
The InfluxDB Backend Listener currently provides limited error information:
- Missing Assertion Details: Assertion failures are completely ignored in error metrics
- No individual assertion failure reporting
- No distinction between different types of assertion failures
- Loss of valuable debugging information
- Incomplete Error Information: Only HTTP response code/message errors are captured
- Assertion failures are not reflected in error metrics
- No visibility into specific assertion failure reasons
- Difficult to debug test failures without detailed error context
- Poor Error Debugging: Users cannot identify:
- Which specific assertions are failing
- Why assertions are failing (missing expected text, duration exceeded, etc.)
- Patterns in assertion failures across different test scenarios
I have the potential solution to resolve this issue: The issue is in the SamplerMetric.add() method in src/components/src/main/java/org/apache/jmeter/visualizers/backend/SamplerMetric.java. The current implementation only creates ErrorMetric objects based on HTTP response codes, ignoring assertion failures entirely.
Required Changes:
- Enhance Error Processing: Modify the error handling logic to process both HTTP response failures and assertion failures
- Add Assertion Failure Support: Create ErrorMetric objects for each failed assertion with assertion name and failure message
- Improve Error Categorization: Distinguish between HTTP response errors and assertion errors in the metrics
Steps to reproduce the problem
- Create JMeter Test Plan:
- Add Thread Group
- Add HTTP Request sampler (configure valid URL)
- Add Response Assertion (configure to fail - e.g., check for text that doesn't exist)
- Add InfluxDB Backend Listener
- Configure Response Assertion:
- Set "Apply to" to "Main sample only"
- Add "Contains" pattern with text that won't be found in response Or add Duration Assertion with very low threshold (e.g., 1ms)
- Configure InfluxDB Backend Listener:
- Set InfluxDB URL
- Set database name
- Enable "summaryOnly" = false
- Set appropriate measurement name
- Run Test and observe in InfluxDB/Grafana:
- Expected: Error metrics showing all assertion name (in responseCode) and failure message (in responseMessage) per sample/ transaction
- Actual: No error metrics for assertion failures, only constant Error responseCode (Assertion Failed) and single assertion failed message per sample/ transaction are captured
- Verify Missing Information:
- Check InfluxDB for error metrics with assertion names
- Verify that assertion failure messages are not present
- Confirm that only HTTP response codes appear in error metrics
JMeter Version
5.6.3
Java Version
No response
OS Version
No response
- Lenguaje dominante
- Java
- Estrellas
- 9.6k
- Forks
- 2.3k
- Merge medio
- 19 h 29 min
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/jmeter
-
[Bug] Typo in assertion property name: "Asserion.test_strings" missing 't'Posiblemente ocupada @waterWang la tomó hace 53 días. Abiertodefect to-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
apache/jmeter#6751 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement to-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
RandomDate ignores inclusive end date and throws when start == endPosiblemente ocupada @weillercarvalho la tomó hace 330 días. Abiertodefect to-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/jmeter#6609 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
documentation to-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
invalid wontfix
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
apache/jmeter#5770 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/jmeter
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
objectionary/lints#1556 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
wildfly/wildfly-launcher#99 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
apache/rocketmq#11427 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
A failed JNA download is reported as a corrupt zip, because `curl` in `Makefile` lacks `--fail`Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
objectionary/phino#1884 · 1 comentario ·
Los mantenedores suelen responder en 1 día