-
Notifications
You must be signed in to change notification settings - Fork 63
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
NGINX plus receiver #742
base: v3
Are you sure you want to change the base?
NGINX plus receiver #742
Conversation
* Add unit test with fairly extensive mock responses * Fix units in metadata.yaml
func (oc *Collector) handleNginxConfigUpdate(ctx context.Context, msg *bus.Message) { | ||
nginxConfigContext, ok := msg.Data.(*model.NginxConfigContext) | ||
if !ok { | ||
slog.ErrorContext(ctx, "Unable to cast message payload to *model.NginxConfigContext", "payload", msg.Data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably need a return
here too.
slog.ErrorContext(ctx, "Unable to cast message payload to *model.NginxConfigContext", "payload", msg.Data) | |
slog.ErrorContext(ctx, "Unable to cast message payload to *model.NginxConfigContext", "payload", msg.Data) |
slog.ErrorContext(ctx, "Unable to cast message payload to *model.NginxConfigContext", "payload", msg.Data) | |
slog.ErrorContext(ctx, "Unable to cast message payload to *model.NginxConfigContext", "payload", msg.Data) | |
return |
errChan := make(chan error) | ||
|
||
oc.stopped = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a side note, should we toggle this to true
when we receive an error from oc.service.Run(ctx)
and/or when state is otelcol.StateClosed
in the for loop below?
@@ -117,19 +119,182 @@ func (oc *Collector) Close(ctx context.Context) error { | |||
slog.InfoContext(ctx, "Closing OTel Collector plugin") | |||
|
|||
if !oc.stopped { | |||
slog.InfoContext(ctx, "Shutting down OTel Collector", "state", oc.service.GetState()) | |||
oc.stopped = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in the interest of correctness, should we toggle this only when state is otelcol.StateClosed
in our backoff function?
Proposed changes
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
documentmake install-tools
and have attached any dependency changes to this pull requestREADME.md
)