diff --git a/docs/prometheus-metrics.md b/docs/prometheus-metrics.md index be1811c..2169cd3 100644 --- a/docs/prometheus-metrics.md +++ b/docs/prometheus-metrics.md @@ -6,7 +6,7 @@ Both Events and Configuration API exposes Prometheus metrics. The metrics are ac | Metric Name | Description | Type | Labels | | --------------------------------- | ------------------------------------------------------------ | ------- | ---------------- | -| `gateway_events_received_total` | Total of events received. | Counter | `space`, `type` | +| `gateway_events_received_total` | Total of events received. | Counter | `space`, `type` | | `gateway_events_processed_total` | Total of processed events. | Counter | `space`, `type` | | `gateway_events_dropped_total` | Total of events dropped due to insufficient processing power. | Counter | `space`, `type` | | `gateway_events_backlog` | Gauge of asynchronous events count waiting to be processed. | Gauge | | diff --git a/router/router.go b/router/router.go index 6531d76..6583a7d 100644 --- a/router/router.go +++ b/router/router.go @@ -167,18 +167,9 @@ var ( ) func (router *Router) handleSyncSubscription(path string, event eventpkg.Event, subscriber SyncSubscriber, w http.ResponseWriter, r *http.Request) { - // metrics & logs metricEventsReceived.WithLabelValues(subscriber.Space, string(event.EventType)).Inc() - router.log.Debug("Event received.", zap.String("path", path), zap.String("space", subscriber.Space), zap.Object("event", event)) - err := router.emitSystemEventReceived(path, event, r.Header) - if err != nil { - router.log.Debug("Event processing stopped because sync plugin subscription returned an error.", - zap.Object("event", event), - zap.Error(err)) - return - } - err = router.authorizeEventType(subscriber.Space, &event, r) + err := router.authorizeEventType(subscriber.Space, &event, r) if err != nil { w.WriteHeader(http.StatusForbidden) return