Skip to content

Update module github.com/nginxinc/nginx-plus-go-client to v2 #855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 26, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Use context.TODO for now
  • Loading branch information
lucacome committed Sep 24, 2024
commit 581b5a9aabc8a114e1f382411d342a10b71409c5
3 changes: 2 additions & 1 deletion collector/nginx_plus.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package collector

import (
"context"
"fmt"
"log/slog"
"strconv"
Expand Down Expand Up @@ -622,7 +623,7 @@
c.mutex.Lock() // To protect metrics from concurrent collects
defer c.mutex.Unlock()

stats, err := c.nginxClient.GetStats()
stats, err := c.nginxClient.GetStats(context.TODO())

Check warning on line 626 in collector/nginx_plus.go

View check run for this annotation

Codecov / codecov/patch

collector/nginx_plus.go#L626

Added line #L626 was not covered by tests
if err != nil {
c.upMetric.Set(nginxDown)
ch <- c.upMetric
Expand Down