Skip to content

Commit

Permalink
Merge pull request #67 from bugrakocabay/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
bugrakocabay authored Feb 3, 2024
2 parents dc769b6 + 25092e8 commit cb38a20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/queue/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package kafka

import (
"context"
"github.com/bugrakocabay/konsume/pkg/config"
"log/slog"

"github.com/bugrakocabay/konsume/pkg/config"

"github.com/segmentio/kafka-go"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/requester/requester.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (r *Requester) SendRequest(m *config.MetricsConfig, timeout time.Duration)
}
defer resp.Body.Close()

if m.Enabled {
if m != nil && m.Enabled {
metrics.HttpRequestsMade.Inc()
if resp.StatusCode >= m.ThresholdStatus {
metrics.HttpRequestsFailed.Inc()
Expand Down

0 comments on commit cb38a20

Please sign in to comment.