Skip to content

fix: add logging for telemetry hits and publishing events in handlers#60

Merged
H4S1NTH4 merged 1 commit into
mainfrom
hasintha/fix/inter-service-telemetry-publish
May 2, 2026
Merged

fix: add logging for telemetry hits and publishing events in handlers#60
H4S1NTH4 merged 1 commit into
mainfrom
hasintha/fix/inter-service-telemetry-publish

Conversation

@H4S1NTH4
Copy link
Copy Markdown
Collaborator

@H4S1NTH4 H4S1NTH4 commented May 2, 2026

Summary by CodeRabbit

Chores

  • Improved logging and observability for telemetry event handling with timestamp validation tracking
  • Added success logging indicators when telemetry events are published to message brokers

@vercel
Copy link
Copy Markdown

vercel Bot commented May 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agri-wizard Ready Ready Preview, Comment May 2, 2026 2:35am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b202626e-e38b-4051-a964-21ad932b3641

📥 Commits

Reviewing files that changed from the base of the PR and between a2df789 and f1a4787.

📒 Files selected for processing (1)
  • services/hardware-service/handlers.go

📝 Walkthrough

Walkthrough

The pull request adds informational logging to the telemetry handling pipeline in services/hardware-service/handlers.go. When telemetry is received via MQTT, a log records the sensor ID and topic. When publishing succeeds to RabbitMQ or Service Bus, success logs are emitted for each event.

Changes

Telemetry Observability

Layer / File(s) Summary
MQTT Receipt Logging
services/hardware-service/handlers.go
handleTelemetry logs [INFO] mqtt_telemetry_hit with sensor ID, MQTT topic, and reading count after ensuring timestamp is set.
Publication Success Logging
services/hardware-service/handlers.go
publishTelemetryToRabbitMQ adds success logs (published_to_rmq / published_to_sb) when RabbitMQ or Service Bus publication succeeds, while preserving existing error/warning logs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 The logs now sing with every hop,
Telemetry flows, we watch the plot,
From MQTT hops to buses bright,
Each message seen, from dawn to night! 📡✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hasintha/fix/inter-service-telemetry-publish

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.11.4)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@H4S1NTH4 H4S1NTH4 merged commit 04cf39c into main May 2, 2026
4 of 6 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