Skip to content
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

General Telemetry v3 #6012

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

General Telemetry v3 #6012

wants to merge 13 commits into from

Conversation

clintoncwolfe
Copy link
Contributor

@clintoncwolfe clintoncwolfe commented Apr 25, 2022

Description

Adds generalized (that is, usage / feature detection) telemetry to InSpec.
Removes the vestigial v1 telemetry code that was never used.

TODO BEFORE RELEASE

  • Revert Gemfile changes after the release of the chef-licensing gem. These telemetry changes have a dependency on chef-licensing gem changes for using license context.
  • Set TELEMETRY_URL of production deployed telemetry service.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read the CONTRIBUTING document.

@netlify
Copy link

netlify bot commented Apr 25, 2022

Deploy Preview for chef-inspec canceled.

Name Link
🔨 Latest commit b50ab0e
🔍 Latest deploy log https://app.netlify.com/sites/chef-inspec/deploys/6266a3237719a900089b164b

Copy link

netlify bot commented Jan 31, 2024

Deploy Preview for chef-inspec canceled.

Name Link
🔨 Latest commit a1cb1e7
🔍 Latest deploy log https://app.netlify.com/sites/chef-inspec/deploys/6661a506e103bc000874b402

test/unit/utils/telemetry_test.rb Fixed Show fixed Hide fixed
test/unit/utils/telemetry_test.rb Fixed Show fixed Hide fixed
@Nik08 Nik08 mentioned this pull request Feb 15, 2024
4 tasks
@clintoncwolfe clintoncwolfe marked this pull request as ready for review April 10, 2024 12:15
@clintoncwolfe clintoncwolfe requested a review from a team as a code owner April 10, 2024 12:15
@Nik08 Nik08 force-pushed the cw/general-telemetry-v3 branch 2 times, most recently from c4aa244 to f02267b Compare April 16, 2024 09:26
test/unit/utils/telemetry_test.rb Dismissed Show dismissed Hide dismissed
clintoncwolfe and others added 13 commits June 6, 2024 17:30
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Added initial changes to jobs api

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Feature flag changes for telemetry

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* move base, debug and null to its own file structure

Signed-off-by: Sathish <sbabu@progress.com>

* make HTTP client post requests

Signed-off-by: Sathish <sbabu@progress.com>

* remove old logic

Signed-off-by: Sathish <sbabu@progress.com>

* make backend class as `HTTP`

Signed-off-by: Sathish <sbabu@progress.com>

* CHEF-7258 Fetch and use licensing information for telemetry (#6964)

* Added method to fetch license ids for inspec

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Added free license check for performing telemetry api call

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* move base, debug and null to its own file structure

Signed-off-by: Sathish <sbabu@progress.com>

* make HTTP client post requests

Signed-off-by: Sathish <sbabu@progress.com>

* remove old logic

Signed-off-by: Sathish <sbabu@progress.com>

* make backend class as `HTTP`

Signed-off-by: Sathish <sbabu@progress.com>

---------

Signed-off-by: Nik08 <nikita.mathur@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Co-authored-by: Sathish <sbabu@progress.com>

* Updated control tags and desc value to be used in jobs api

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Added checks for automate run context and free license check

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* capture target mode and id

Signed-off-by: Sathish <sbabu@progress.com>

* profile doesn't need ID

Signed-off-by: Sathish <sbabu@progress.com>

* use run context to set environment data

Signed-off-by: Sathish <sbabu@progress.com>

* refactor `create_wrapper` to be localized

Signed-off-by: Sathish <sbabu@progress.com>

* change all timestamps to be UTC

Signed-off-by: Sathish <sbabu@progress.com>

* Null checks for response and corrected job api endpoint

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Fixed tag values to be sent as string in api call

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* make version as float

Signed-off-by: Sathish <sbabu@progress.com>

* add platform name

Signed-off-by: Sathish <sbabu@progress.com>

* Added control result data in jobs api payload

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Debug logs added for telemetry call

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Removed unwanted telemetry debug class

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Payload fix to pass features data only on per control basis

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Added class function to list all invoked features by feature sub system

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Using feature system to get all invoked features list to be used in jobs api

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Unit tests cases updated and fixed

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* License type check downcased

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Lint fix

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* CHEF-7265 Telemetry opt-in for CINC users (#6966)

* Enabled telemtry opt-in

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Removed old comments

Signed-off-by: Nik08 <nikita.mathur@progress.com>

* Unit test case added to validate the disabling telemetry behaviour for inspec user

Signed-off-by: Nik08 <nikita.mathur@progress.com>

---------

Signed-off-by: Nik08 <nikita.mathur@progress.com>

---------

Signed-off-by: Nik08 <nikita.mathur@progress.com>
Signed-off-by: Sathish <sbabu@progress.com>
Co-authored-by: Sathish <sbabu@progress.com>
…icense users

Signed-off-by: Nik08 <nikita.mathur@progress.com>
Signed-off-by: Nik08 <nikita.mathur@progress.com>
Signed-off-by: Nik08 <nikita.mathur@progress.com>
…out feature flag env set

Signed-off-by: Nik08 <nikita.mathur@progress.com>
…est for telemetry data

Signed-off-by: Nik08 <nikita.mathur@progress.com>
… set in env

Signed-off-by: Nik08 <nikita.mathur@progress.com>
Signed-off-by: Nik08 <nikita.mathur@progress.com>
Signed-off-by: Nik08 <nikita.mathur@progress.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants