Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/solver/loracloud/loracloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ func (m LoracloudClient) DeliverUplinkMessage(devEui string, uplinkMsg UplinkMsg
uplinkResponse.GetLongitude() != 0 {
loracloudPositionEstimateNoCapturedAtSetWithValidCoordinatesCounter.WithLabelValues(metricDevEui).Inc()
}
if uplinkResponse.GetTimestamp() != nil &&
uplinkResponse.GetLatitude() != 0 &&
uplinkResponse.GetLongitude() != 0 {
loracloudPositionEstimateValidCounter.WithLabelValues(metricDevEui).Inc()
}

return &uplinkResponse, nil
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/solver/loracloud/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ var (
Name: "truvami_loracloud_position_estimate_no_captured_at_set_with_valid_coordinates_total",
Help: "The total number of position estimate responses where the captured at (UTC) timestamp is not set and the coordinates are valid",
}, []string{"devEUI"})
loracloudPositionEstimateValidCounter = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "truvami_loracloud_position_estimate_valid_total",
Help: "The total number of position estimate responses where the captured at (UTC) timestamp is set and the coordinates are valid",
}, []string{"devEUI"})
)
Loading