Skip to content

Feat/monitoring#6

Merged
sabucds merged 12 commits into
developmentfrom
feat/monitoring
Feb 18, 2026
Merged

Feat/monitoring#6
sabucds merged 12 commits into
developmentfrom
feat/monitoring

Conversation

@sabucds

@sabucds sabucds commented Feb 18, 2026

Copy link
Copy Markdown
Owner

No description provided.

sabucds and others added 12 commits February 18, 2026 09:49
logstash-logback-encoder 7.4, micrometer-tracing-bridge-otel,
opentelemetry-exporter-otlp

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- logback-spring.xml: JSON via LogstashEncoder for non-local profiles,
  human-readable for local; includes traceId, spanId, userId MDC keys
- IdentityMdcFilter: populates MDC userId from X-User-Id header,
  always cleans up in finally (4 tests covering edge cases)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sampling probability via TRACING_SAMPLING_PROBABILITY env var (default 1.0).
Exports traces to Grafana Tempo at http://tempo:4318/v1/traces.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Central @component wrapping MeterRegistry. Tag-less counters
pre-registered in constructor so they appear in /actuator/prometheus
before the first event fires. Tagged counters (login outcome, failure
reason, etc.) remain lazy builders. 14 unit tests via SimpleMeterRegistry.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
… and metrics

- Structured log statements (info/warn/debug) with no sensitive data logged
- IdentityMetrics injected into all 9 services + 2 event handlers
- login: distinguishes user_not_found vs invalid_credentials failure reasons
- token refresh: 'rotation' tag (not 'logout') on revoked session metric
- password reset handler: try/catch so async DB failure is logged not swallowed
- Existing tests updated to pass IdentityMetrics (SimpleMeterRegistry); new
  metrics tests for LoginService and RegisterUserService

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Config: OTLP HTTP on 4318, local filesystem storage, query API on 3200.
docker-compose: tempo service with named volume.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Loki: schema v13, TSDB index, filesystem storage on port 3100.
Promtail: Docker socket + container log volume discovery (macOS and Linux
compatible); pipeline extracts level, traceId, spanId from JSON logs.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Datasources: Prometheus (default), Loki (uid: loki, traceId derived field
→ Tempo), Tempo (uid: tempo, tracesToLogsV2 → Loki, service map → Prometheus).
Dashboards folder provider + 3 JSON skeletons: identity-health,
identity-business, identity-errors.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
6 rules: IdentityServiceDown, HighLoginFailureRate, PasswordResetAbuse,
HighHttpErrorRate, SlowResponses, DBConnectionPoolExhausted.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Tempo, Loki, Promtail services with named volumes
- Grafana provisioning volume mount and depends_on (prometheus, loki, tempo)
- Prometheus rules volume mount
- identity-service: TRACING_SAMPLING_PROBABILITY env var

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧪 Test Results

234 tests   234 ✅  13s ⏱️
 34 suites    0 💤
 34 files      0 ❌

Results for commit 468709f.

@github-actions

Copy link
Copy Markdown

📊 Code Coverage Report

Overall Project 62.09% -0.94%
Files changed 92.73% 🍏

Module Coverage
identity-service 67.04% -1.05% 🍏
Files
Module File Coverage
identity-service LogoutService.java 100% 🍏
LoginService.java 100% 🍏
RefreshTokenService.java 100% 🍏
VerifyResetTokenService.java 100% 🍏
RequestPasswordResetService.java 100% 🍏
ResetPasswordService.java 100% 🍏
IdentityMdcFilter.java 100% 🍏
IdentityMetrics.java 100% 🍏
RegisterUserService.java 100% 🍏
DeleteUserService.java 100% 🍏
GetUserByIdService.java 100% 🍏
RevokeSessionsOnPasswordResetHandler.java 0% -60.87%
SendPasswordResetEmailHandler.java 0% -39.22%

@sabucds sabucds merged commit 08aa4ad into development Feb 18, 2026
3 checks passed
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.

1 participant