-
Notifications
You must be signed in to change notification settings - Fork 72
[Feature] [Platform] Allows to opt out in the Inventory Telemetry #1980
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| // | ||
| // DISCLAIMER | ||
| // | ||
| // Copyright 2025 ArangoDB GmbH, Cologne, Germany | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
| // | ||
| // Copyright holder is ArangoDB GmbH, Cologne, Germany | ||
| // | ||
|
|
||
| package inventory | ||
|
|
||
| type Configuration struct { | ||
| Telemetry *bool | ||
| } | ||
|
|
||
| func (c *Configuration) WithTelemetry() bool { | ||
| if c == nil || c.Telemetry == nil { | ||
| return true | ||
| } | ||
| return *c.Telemetry | ||
| } | ||
|
Comment on lines
+27
to
+32
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -73,9 +73,15 @@ func buildInventory(cmd *cobra.Command) (*inventory.Spec, error) { | |||||||||||||||||
| return nil, err | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| var cfg inventory.Configuration | ||||||||||||||||||
|
|
||||||||||||||||||
| if v, err := flagTelemetry.Get(cmd); err != nil || !v { | ||||||||||||||||||
| cfg.Telemetry = util.NewType(false) | ||||||||||||||||||
| } | ||||||||||||||||||
|
Comment on lines
+78
to
+80
|
||||||||||||||||||
| if v, err := flagTelemetry.Get(cmd); err != nil || !v { | |
| cfg.Telemetry = util.NewType(false) | |
| } | |
| v, err := flagTelemetry.Get(cmd) | |
| if err != nil { | |
| return nil, err | |
| } | |
| cfg.Telemetry = util.NewType(v) |
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 log message 'Collecting Telemetry details' is misleading because it's shown for all AQL queries, not just telemetry-related ones. When
telemetry=false(for basic AQL queries), this message still appears. Consider moving the logging inside the conditional branches or making the message more accurate, e.g., 'Executing AQL query' for non-telemetry queries.