-
Notifications
You must be signed in to change notification settings - Fork 137
OpenShift Support: Product Telemetry #4038
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4038 +/- ##
==========================================
- Coverage 86.73% 86.71% -0.02%
==========================================
Files 128 128
Lines 16758 16761 +3
Branches 62 62
==========================================
Hits 14535 14535
- Misses 2040 2042 +2
- Partials 183 184 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
nicely done, just a couple of small comments
if buildOS == "" { | ||
buildOS = "alpine" | ||
} |
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 don't think we need this since we have the check in commands.go
. So like how we don't add an additional check for ImageSource
I think we can follow suite.
cmd/gateway/commands.go
Outdated
imageSource = "unknown" | ||
} | ||
|
||
buildOs := os.Getenv("BUILD_OS") |
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.
Couldn't you just call this directly in the collector, rather than calling here and passing the var all the way through the code?
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.
That's a great point! Since I saw the same for imageSource := os.Getenv("BUILD_AGENT")
above I figured this was the appropriate way to approach it.
* Update module google.golang.org/grpc to v1.76.0 | datasource | package | from | to | | ---------- | ---------------------- | ------- | ------- | | go | google.golang.org/grpc | v1.75.1 | v1.76.0 | Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update files for renovate --------- Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
| datasource | package | from | to | | ---------- | ---------------------------- | ------- | ------- | | go | github.com/prometheus/common | v0.66.1 | v0.67.1 | Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
| datasource | package | from | to | | ----------- | -------------------- | ------- | ------- | | github-tags | github/codeql-action | v3.30.6 | v4.30.7 | Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Update nginx Docker tag to v1.29.2 | datasource | package | from | to | | ---------- | ------- | ------ | ------ | | docker | nginx | 1.29.1 | 1.29.2 | Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update README * Remove package updates --------- Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ciara Stacke <[email protected]>
…38dc (#4039) Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@shaun-nx also looks like there is some rebase issue occurring since theres a few additional files |
// | ||
//go:generate go run -tags generator github.com/nginx/telemetry-exporter/cmd/generator -type=Data -scheme -scheme-protocol=NGFProductTelemetry -scheme-df-datatype=ngf-product-telemetry | ||
type Data struct { | ||
type Data struct { //nolint |
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 add a little comment here explaining why we nolint. bringing up the fieldaligntment issue but we need to have these fields in a specific order.
Name: cfg.GatewayPodConfig.Name, | ||
}, | ||
ImageSource: cfg.ImageSource, | ||
BuildOS: os.Getenv("BUILD_OS"), |
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 think we'll still need the check you had before and like in ImageSource where BUILD_OS could be something else besides ubi or it could be empty.
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.
imageSource := os.Getenv("BUILD_AGENT")
if imageSource != "gha" && imageSource != "local" {
imageSource = "unknown"
}
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.
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.
Yes, os.Getenv("BUILD_OS") should be directly accessible in this file (probably even just in the collector file), but we'll still need to check the value of it. Since it could be empty and we don't want to pass that empty value in and would rather pass in something like "unknown" or "alpine"
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.
Ah fair point. I'll update that too.
ControlPlanePodCount int64 | ||
// NginxOneConnectionEnabled is a boolean that indicates whether the connection to the Nginx One Console is enabled. | ||
NginxOneConnectionEnabled bool | ||
// BuildOS is the OS the NGF and NGINX binary was built on. |
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.
Technically this just checks the OS of NGF right? Do we know the expected functionality if somebody builds NGF with ubi but then tries to use NGINX in the other os?
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.
Good point, I'm not really sure how that would work, or if it even can. I guess nothing really stops anyone from mixing them
Proposed changes
This change adds the
BuildOS
field to our product telemetry.Closes #4037
Blocked by #4008
Should not be merged until feat/inference-extension is merged
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Release notes
If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.