-
Notifications
You must be signed in to change notification settings - Fork 525
algod: Add static EnableTelemetry retry #6183
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
Changes from all commits
e7e3e9e
5053e2d
5a423b2
7669e58
8498a79
dbbb09d
375f4a6
5d93b6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,13 +17,15 @@ | |
| package logging | ||
|
|
||
| import ( | ||
| "context" | ||
| "encoding/json" | ||
| "fmt" | ||
| "github.com/sirupsen/logrus" | ||
| "github.com/stretchr/testify/require" | ||
| "os" | ||
| "testing" | ||
|
|
||
| "github.com/sirupsen/logrus" | ||
| "github.com/stretchr/testify/require" | ||
|
|
||
| "github.com/algorand/go-deadlock" | ||
|
|
||
| "github.com/algorand/go-algorand/config" | ||
|
|
@@ -84,7 +86,7 @@ func makeTelemetryTestFixtureWithConfig(minLevel logrus.Level, cfg *TelemetryCon | |
| f.l = Base().(logger) | ||
| f.l.SetLevel(Debug) // Ensure logging doesn't filter anything out | ||
|
|
||
| f.telem, _ = makeTelemetryState(lcfg, func(cfg TelemetryConfig) (hook logrus.Hook, err error) { | ||
| f.telem, _ = makeTelemetryStateContext(context.Background(), lcfg, func(ctx context.Context, cfg TelemetryConfig) (hook logrus.Hook, err error) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought I was following all the Context plumbing, but when it gets to here I don't understand. It seems like the context is being dropped now, so how can the original
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you mean in this test? in the code the context plumbed down to |
||
| return &f.hook, nil | ||
| }) | ||
| f.l.loggerState.telemetry = f.telem | ||
|
|
@@ -138,7 +140,7 @@ func TestCreateHookError(t *testing.T) { | |
|
|
||
| cfg := createTelemetryConfig() | ||
| cfg.Enable = true | ||
| telem, err := makeTelemetryState(cfg, func(cfg TelemetryConfig) (hook logrus.Hook, err error) { | ||
| telem, err := makeTelemetryStateContext(context.Background(), cfg, func(ctx context.Context, cfg TelemetryConfig) (hook logrus.Hook, err error) { | ||
| return nil, fmt.Errorf("failed") | ||
| }) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.