-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[exporter/loadbalancing] Change config fields to use snake_case #32331
[exporter/loadbalancing] Change config fields to use snake_case #32331
Conversation
b7d4960
to
2d52fce
Compare
2d52fce
to
a280f5c
Compare
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.
cc @jpkrohling
I know it's a pain, but given that this component is in "Beta" stability, shouldn't we do the rename via a feature gate? |
The feature was introduced only in 0.97.0 #27588 so I expect it's not widely used yet. And I want to unblock #32328 sooner to avoid any other issues like this merged in. So I'd rather make it as a breaking change but happy to hear what others think cc @jpkrohling @open-telemetry/collector-contrib-approvers |
Makes sense to me 🚀 |
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.
The README needs an update as well
a280f5c
to
f416b78
Compare
Updated README |
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.
Another reference that needs fixed (output of an error message):
opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_aws_cloudmap.go
Line 30 in adae336
errNoServiceName = errors.New("no Cloud Map serviceName specified to resolve the backends") |
Some other references that should possibly be updated (log messages for config names):
opentelemetry-collector-contrib/exporter/loadbalancingexporter/resolver_aws_cloudmap.go
Lines 117 to 122 in adae336
r.logger.Info("AWS CloudMap resolver started", | |
zap.Stringp("serviceName", r.serviceName), | |
zap.Stringp("namespaceName", r.namespaceName), | |
zap.Uint16p("port", r.port), | |
zap.String("healthStatus", string(*r.healthStatus)), | |
zap.Duration("interval", r.resInterval), zap.Duration("timeout", r.resTimeout)) |
awsCloudMapLogger := params.Logger.With(zap.String("resolver", "awsCloudMap")) |
Thanks @crobert-1. Updated |
namespace: aws-namespace | ||
serviceName: aws-otel-col-service-name | ||
service_name: aws-otel-col-service-name |
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.
service_name: aws-otel-col-service-name | |
service_name: otel-col-service-name |
Teeny tiny nit. Vendor agnostic right :)
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.
Should I change aws-namespace
as well? It's pretty hard to make AWS Cloud Map resolver vendor agnostic :)
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 believe this is the last reference, but not necessarily essential:
awsCloudMapLogger := params.Logger.With(zap.String("resolver", "awsCloudMap")) |
Change AWS Cloud map resolver config fields from camelCase to snake_case. The snake_case is required in OTel Collector config fields. It used to be enforced by tests in cmd/oteltestbedcol, but we had to disable them some time ago. Now, the tests are going to be enforced on every component independently. Hence, the camelCase config fields recently added with the bew AWS Cloud Map resolver has to be fixed.
Co-authored-by: Curtis Robert <crobert@splunk.com>
Co-authored-by: Curtis Robert <crobert@splunk.com>
75e869c
to
105494b
Compare
Change AWS Cloud map resolver config fields from camelCase to snake_case.
The snake_case is required in OTel Collector config fields. It used to be enforced by tests in cmd/oteltestbedcol, but we had to disable them some time ago. Now, the tests are going to be enforced on every component independently. Hence, the camelCase config fields recently added with the new AWS Cloud Map resolver has to be fixed.