-
Notifications
You must be signed in to change notification settings - Fork 41
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
chore: update otelcol core to v0.99.0 #1560
Conversation
0394541
to
0da675c
Compare
0da675c
to
77bcb1e
Compare
envprovider.NewFactory(), | ||
yamlprovider.NewFactory(), | ||
httpprovider.NewFactory(), | ||
httpsprovider.NewFactory(), |
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.
Could you compare with linux collector? I see we are missing globprovider
here
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.
I'm not sure if we need to have collector_windows.go
in our repo, main_windows.go has this form:
// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT.
//go:build windows
package main
import (
"errors"
"fmt"
"golang.org/x/sys/windows"
"golang.org/x/sys/windows/svc"
"go.opentelemetry.io/collector/otelcol"
)
func run(params otelcol.CollectorSettings) error {
// No need to supply service name when startup is invoked through
// the Service Control Manager directly.
err := UseCustomConfigProvider(¶ms)
if err != nil {
return err
}
cmd := otelcol.NewCommand(params)
// this is only here so that the flag can be recognized by the upstream parser and displayed in help
cmd.Flags().StringVarP(&opAmpConfig, "remote-config", "", "", "path to opamp config file")
if err := svc.Run("", NewSvcHandler(params)); err != nil {
if errors.Is(err, windows.ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) {
// Per https://learn.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-startservicectrldispatchera#return-value
// this means that the process is not running as a service, so run interactively.
return runInteractive(params)
}
return fmt.Errorf("failed to start collector server: %w", err)
}
return nil
}
UseCustomConfigProvider uses this NewConfigProviderSettings which has globprovider 🤷
We have test for globprovider - here and tests are executed on windows
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.
issue for checking if we need to have collector_windows.go
#1565
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.
I'm not sure if this code is used right now. For now, it's reasonable to add globprovider here though, imo.
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.
ok, I'll add globprovider
here
77bcb1e
to
2f23ec2
Compare
2f23ec2
to
6f0ee8b
Compare
6f0ee8b
to
e7b1f8a
Compare
chore: update otelcol core to v0.99.0
Deprecations/important changes that impacts update: