-
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/coralogixexporter] Allow setting domain for coralogixexporter #20743
Conversation
Foresight Summary
View More Details✅ e2e-tests workflow has finished in 10 minutes 53 seconds (3 minutes 12 seconds less than
|
Job | Failed Steps | Tests | |
---|---|---|---|
kubernetes-test (v1.26.0) | - 🔗 | N/A | See Details |
kubernetes-test (v1.25.3) | - 🔗 | N/A | See Details |
kubernetes-test (v1.24.7) | - 🔗 | N/A | See Details |
kubernetes-test (v1.23.13) | - 🔗 | N/A | See Details |
⭕ build-and-test-windows workflow has finished in 10 seconds (30 minutes 16 seconds less than main
branch avg.) and finished at 11th Apr, 2023.
Job | Failed Steps | Tests | |
---|---|---|---|
windows-unittest-matrix | - 🔗 | N/A | See Details |
windows-unittest | - 🔗 | N/A | See Details |
⭕ prometheus-compliance-tests workflow has finished in 4 minutes 10 seconds (2 minutes 10 seconds less than main
branch avg.) and finished at 11th Apr, 2023.
Job | Failed Steps | Tests | |
---|---|---|---|
prometheus-compliance-tests | - 🔗 | N/A | See Details |
⭕ load-tests workflow has finished in 4 minutes 14 seconds (6 minutes 6 seconds less than main
branch avg.) and finished at 11th Apr, 2023.
Job | Failed Steps | Tests | |
---|---|---|---|
setup-environment | - 🔗 | N/A | See Details |
loadtest | - 🔗 | N/A | See Details |
⭕ build-and-test workflow has finished in 4 minutes 51 seconds (41 minutes 50 seconds less than main
branch avg.) and finished at 11th Apr, 2023.
Job | Failed Steps | Tests | |
---|---|---|---|
setup-environment | - 🔗 | N/A | See Details |
build-examples | - 🔗 | N/A | See Details |
checks | - 🔗 | N/A | See Details |
check-codeowners | - 🔗 | N/A | See Details |
check-collector-module-version | - 🔗 | N/A | See Details |
correctness-metrics | - 🔗 | N/A | See Details |
correctness-traces | - 🔗 | N/A | See Details |
integration-tests | - 🔗 | N/A | See Details |
lint-matrix (receiver-0) | - 🔗 | N/A | See Details |
lint-matrix (receiver-1) | - 🔗 | N/A | See Details |
lint-matrix (processor) | - 🔗 | N/A | See Details |
lint-matrix (exporter) | - 🔗 | N/A | See Details |
lint-matrix (extension) | - 🔗 | N/A | See Details |
lint-matrix (connector) | - 🔗 | N/A | See Details |
lint-matrix (internal) | - 🔗 | N/A | See Details |
lint-matrix (other) | - 🔗 | N/A | See Details |
unittest-matrix (1.20, receiver-0) | - 🔗 | N/A | See Details |
unittest-matrix (1.20, receiver-1) | - 🔗 | N/A | See Details |
unittest-matrix (1.20, processor) | - 🔗 | N/A | See Details |
unittest-matrix (1.20, exporter) | - 🔗 | N/A | See Details |
unittest-matrix (1.20, extension) | - 🔗 | N/A | See Details |
unittest-matrix (1.20, connector) | - 🔗 | N/A | See Details |
unittest-matrix (1.20, internal) | - 🔗 | N/A | See Details |
unittest-matrix (1.20, other) | - 🔗 | N/A | See Details |
unittest-matrix (1.19, receiver-0) | - 🔗 | N/A | See Details |
unittest-matrix (1.19, receiver-1) | - 🔗 | N/A | See Details |
unittest-matrix (1.19, processor) | - 🔗 | N/A | See Details |
unittest-matrix (1.19, exporter) | - 🔗 | N/A | See Details |
unittest-matrix (1.19, extension) | - 🔗 | N/A | See Details |
unittest-matrix (1.19, connector) | - 🔗 | N/A | See Details |
unittest-matrix (1.19, internal) | - 🔗 | N/A | See Details |
unittest-matrix (1.19, other) | - 🔗 | N/A | See Details |
lint | Interpret result 🔗 | N/A | See Details |
unittest (1.20) | Interpret result 🔗 | N/A | See Details |
unittest (1.19) | Interpret result 🔗 | N/A | See Details |
cross-compile | - 🔗 | N/A | See Details |
build-package | - 🔗 | N/A | See Details |
windows-msi | - 🔗 | N/A | See Details |
publish-stable | - 🔗 | N/A | See Details |
publish-dev | - 🔗 | N/A | See Details |
publish-check | - 🔗 | N/A | See Details |
rotate-milestone | - 🔗 | N/A | See Details |
✅ telemetrygen workflow has finished in 1 minute 17 seconds and finished at 11th Apr, 2023.
Job | Failed Steps | Tests | |
---|---|---|---|
publish-latest | - 🔗 | N/A | See Details |
build-dev | - 🔗 | N/A | See Details |
publish-stable | - 🔗 | N/A | See Details |
✅ check-links workflow has finished in 1 minute 40 seconds (⚠️ 41 seconds more than main
branch avg.) and finished at 11th Apr, 2023.
Job | Failed Steps | Tests | |
---|---|---|---|
changed files | - 🔗 | N/A | See Details |
check-links | - 🔗 | N/A | See Details |
✅ changelog workflow has finished in 1 minute 50 seconds and finished at 11th Apr, 2023.
Job | Failed Steps | Tests | |
---|---|---|---|
changelog | - 🔗 | N/A | See Details |
*You can configure Foresight comments in your organization settings page.
a2257cb
to
337c1b7
Compare
if e.clientConn, err = e.config.Logs.ToClientConn(ctx, host, e.settings, grpc.WithUserAgent(e.userAgent)); err != nil { | ||
return err | ||
switch { | ||
case !isEmpty(e.config.Logs.Endpoint): |
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.
Do you want the LogsEndpoint configuration to take precedence over Domain? The config allows setting traces/metrics/logs endpoints and domain endpoint at the moment.
@@ -31,3 +30,14 @@ coralogix/all: | |||
application_name: "APP_NAME" | |||
subsystem_name: "SUBSYSTEM_NAME" | |||
timeout: 5s | |||
|
|||
coralogix/domain: |
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.
If setting both the signal specific endpoints and domain is intended can you add a test case for that scenario
My 0.02c, this is breaking change and given that the component is in beta, you should offer both new and old sets of configuration keys and deprecate and remove the old ones later. |
@atoulme This PR leaves the original configuration options and only introduces a new one. As long as the old options are supported this isn't a breaking change. If the intent is to remove them eventually then in the future we can use the deprecation process and feature gates. |
@@ -56,8 +56,16 @@ type logsExporter struct { | |||
} | |||
|
|||
func (e *logsExporter) start(ctx context.Context, host component.Host) (err error) { |
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.
Why not invert the logic and avoid the negative at the beginning of the statement, it may make readability a little better.
Like:
switch {
case isEmpty(e.config.Logs.Endpoint):
if e.clientConn, err = e.config.getDomainGrpcSettings().ToClientConn(ctx, host, e.settings, grpc.WithUserAgent(e.userAgent)); err != nil {
return err
}
case isEmpty(e.config.Domain):
if e.clientConn, err = e.config.Logs.ToClientConn(ctx, host, e.settings, grpc.WithUserAgent(e.userAgent)); err != nil {
return err
}
}
Since we're validating it before we create a connection should be fine
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 disagree. Checking if a thing is not empty and then using it is the standard practice in programming, it requires for reader to keep less state in it's head and not to worry about whether the code was validated before.
6156521
to
01218c9
Compare
Uuups did some bad rebase, orry folks for the notification, let me close this one |
Description:
Allow setting domain for coralogixexporter instead of multiple endpoints for signal type.
Old way of configuring is still there and seems to work.
Link to tracking Issue: #20719
Testing:
Documentation: