Skip to content

Claude/test quality fixes#48

Draft
adityamparikh wants to merge 37 commits intoapache:mainfrom
adityamparikh:claude/test-quality-fixes-u2hYP
Draft

Claude/test quality fixes#48
adityamparikh wants to merge 37 commits intoapache:mainfrom
adityamparikh:claude/test-quality-fixes-u2hYP

Conversation

@adityamparikh
Copy link
Contributor

No description provided.

adityamparikh and others added 30 commits February 4, 2026 13:32
…(HTTP mode)

Add comprehensive observability support for HTTP mode using OpenTelemetry
and the Grafana LGTM stack (Loki, Grafana, Tempo, Mimir).

Changes:
- Add spring-boot-starter-opentelemetry dependency
- Add OpenTelemetry logback appender for OTLP log export
- Configure OTLP endpoints in application-http.properties
- Add logback-spring.xml with profile-specific configuration
- Add OpenTelemetryAppenderInstaller component for HTTP profile
- Add lgtm service to compose.yaml for local observability stack
- Add Observability.md documentation guide
- Update README.md with observability feature and docs link

The observability stack provides:
- Distributed tracing via Tempo
- Metrics via Mimir (Prometheus-compatible)
- Log aggregation via Loki
- Grafana dashboards at http://localhost:3000

STDIO mode remains unaffected - no telemetry is enabled to prevent
stdout pollution that would interfere with MCP protocol communication.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add org.springframework.boot.ignore label to prevent conflict between
Docker Compose auto-configuration and manual OTLP endpoint settings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove conflicting manual OTLP endpoint defaults
- Let Spring Boot Docker Compose auto-detect grafana/otel-lgtm container
- Use spring.* namespace instead of management.* for OTLP config
- Update docs to explain auto-configuration vs production setup

This matches the pattern used in github.com/danvega/ot

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes:
- Use management.* namespace for OTLP endpoints (per Spring Boot convention)
- Add explicit localhost defaults for OTLP endpoints
- Add org.springframework.boot.ignore label to lgtm container to prevent
  duplicate bean conflict with Docker Compose auto-configuration
- Cherry-pick security bypass feature to allow testing without OAuth2

The application now starts successfully with OpenTelemetry metrics,
traces, and logs configured for the local LGTM stack.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The spring-ai-spring-boot-docker-compose transitively brings in
spring-boot-starter-mongodb which causes MongoDB auto-configuration
to run even though no MongoDB is used in this project.

Exclude the MongoDB starter to prevent unwanted MongoDB client
creation and health check failures.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Force opentelemetry-proto to version 1.3.2-alpha which uses protobuf
3.23.4 instead of the default 1.8.0-alpha which uses protobuf 4.32.0.

The opentelemetry-proto 1.8.0-alpha has a known incompatibility with
protobuf 4.x causing NoSuchMethodError on getParentForChildren().

See: micrometer-metrics/micrometer#5658

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add spring-boot-starter-aspectj dependency for @observed annotation
  support on service methods (required in Spring Boot 4)
- Add prometheus endpoint to actuator exposure for metrics scraping
- Enable observation annotations with management.observations.annotations.enabled
- Fix Logback pattern with default fallback to prevent empty pattern errors
- Configure stdio profile to use level=OFF instead of ERROR
- Add test profile configuration in logback-spring.xml
- Update Observability.md with LGTM stack documentation and screenshot
- Move Observability.md to dev-docs/ folder

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Spring Boot 4 uses Jackson 3 (tools.jackson) for databind/core but
retains Jackson 2 (com.fasterxml.jackson) for annotations. Update
ObjectMapper imports in CollectionService, SchemaService, JsonUtils,
and their tests to use tools.jackson.databind.ObjectMapper.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
…(HTTP mode)

Add comprehensive observability support for HTTP mode using OpenTelemetry
and the Grafana LGTM stack (Loki, Grafana, Tempo, Mimir).

Changes:
- Add spring-boot-starter-opentelemetry dependency
- Add OpenTelemetry logback appender for OTLP log export
- Configure OTLP endpoints in application-http.properties
- Add logback-spring.xml with profile-specific configuration
- Add OpenTelemetryAppenderInstaller component for HTTP profile
- Add lgtm service to compose.yaml for local observability stack
- Add Observability.md documentation guide
- Update README.md with observability feature and docs link

The observability stack provides:
- Distributed tracing via Tempo
- Metrics via Mimir (Prometheus-compatible)
- Log aggregation via Loki
- Grafana dashboards at http://localhost:3000

STDIO mode remains unaffected - no telemetry is enabled to prevent
stdout pollution that would interfere with MCP protocol communication.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add org.springframework.boot.ignore label to prevent conflict between
Docker Compose auto-configuration and manual OTLP endpoint settings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove conflicting manual OTLP endpoint defaults
- Let Spring Boot Docker Compose auto-detect grafana/otel-lgtm container
- Use spring.* namespace instead of management.* for OTLP config
- Update docs to explain auto-configuration vs production setup

This matches the pattern used in github.com/danvega/ot

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes:
- Use management.* namespace for OTLP endpoints (per Spring Boot convention)
- Add explicit localhost defaults for OTLP endpoints
- Add org.springframework.boot.ignore label to lgtm container to prevent
  duplicate bean conflict with Docker Compose auto-configuration
- Cherry-pick security bypass feature to allow testing without OAuth2

The application now starts successfully with OpenTelemetry metrics,
traces, and logs configured for the local LGTM stack.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The spring-ai-spring-boot-docker-compose transitively brings in
spring-boot-starter-mongodb which causes MongoDB auto-configuration
to run even though no MongoDB is used in this project.

Exclude the MongoDB starter to prevent unwanted MongoDB client
creation and health check failures.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Force opentelemetry-proto to version 1.3.2-alpha which uses protobuf
3.23.4 instead of the default 1.8.0-alpha which uses protobuf 4.32.0.

The opentelemetry-proto 1.8.0-alpha has a known incompatibility with
protobuf 4.x causing NoSuchMethodError on getParentForChildren().

See: micrometer-metrics/micrometer#5658

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add spring-boot-starter-aspectj dependency for @observed annotation
  support on service methods (required in Spring Boot 4)
- Add prometheus endpoint to actuator exposure for metrics scraping
- Enable observation annotations with management.observations.annotations.enabled
- Fix Logback pattern with default fallback to prevent empty pattern errors
- Configure stdio profile to use level=OFF instead of ERROR
- Add test profile configuration in logback-spring.xml
- Update Observability.md with LGTM stack documentation and screenshot
- Move Observability.md to dev-docs/ folder

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Spring Boot 4 uses Jackson 3 (tools.jackson) for databind/core but
retains Jackson 2 (com.fasterxml.jackson) for annotations. Update
ObjectMapper imports in CollectionService, SchemaService, JsonUtils,
and their tests to use tools.jackson.databind.ObjectMapper.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
adityamparikh and others added 7 commits February 4, 2026 17:09
# Conflicts:
#	compose.yaml
#	src/main/resources/application-http.properties
Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
…n test

Replace the hardcoded 5-second Thread.sleep in
DockerImageStdioIntegrationTest.setup() with an Awaitility-based
polling wait that checks for container readiness. This eliminates
flaky timing-dependent test behavior and provides clearer failure
messages if the container doesn't start within 30 seconds.

https://claude.ai/code/session_01LrX7PGFMGM2FMVRiZQ4VKv
@adityamparikh adityamparikh marked this pull request as draft February 7, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants