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

Fixes #23101 - add telemetry options #637

Merged
merged 1 commit into from
Apr 10, 2018
Merged

Conversation

ares
Copy link
Member

@ares ares commented Apr 10, 2018

@ekohl this would be really good to have in 1.18, otherwise every installer run disables telemetry configuration that users configured, cc @lzap

note that the biggest past is indentation of comments

Copy link
Member

@lzap lzap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested but looks good to me.

Boolean $telemetry_prometheus_enabled = $::foreman::params::telemetry_prometheus_enabled,
Boolean $telemetry_statsd_enabled = $::foreman::params::telemetry_statsd_enabled,
Optional[String] $telemetry_statsd_host = $::foreman::params::telemetry_statsd_host
Optional[Enum['statsd', 'statsite', 'datadog']] $telemetry_statsd_protocol = $::foreman::params::telemetry_statsd_protocol
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd actually rather not add this, it can overwhelm users with options and we actually do not use any extensions, I think it might be better idea simply to remove this setting. Or at least write "keep statsd" in documentation comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already hidden under advanced params. If we do not expose it and user changes protocol, on next upgrade, it would be overriden back. Not sure how you mean "keep statsd"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Optional[String] $telemetry_statsd_host = $::foreman::params::telemetry_statsd_host
Optional[Enum['statsd', 'statsite', 'datadog']] $telemetry_statsd_protocol = $::foreman::params::telemetry_statsd_protocol
Boolean $telemetry_logger_enabled = $::foreman::params::telemetry_logger_enabled
Optional[Enum['DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL']] $telemetry_logger_level = $::foreman::params::telemetry_logger_level
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was meant to be for development, maybe at least mention this in docs comment. No practical use.

Copy link
Member Author

@ares ares Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same as above, if we don't expose and people override, it would get reset every time installer runs, I could mention in docs if you suggest the text

Copy link
Member

@lzap lzap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments.

# $hsts_enabled:: Should HSTS enforcement in https requests be enabled
# $telemetry_statsd_host:: Statsd host in format ip:port, do not use DNS
#
# $telemetry_statsd_protocol:: Statsd protocol one of 'statsd', 'statsite' or 'datadog'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to "Statsd protocol one of 'statsd', 'statsite' or 'datadog' - currently only statsd is supported

#
# $telemetry_statsd_protocol:: Statsd protocol one of 'statsd', 'statsite' or 'datadog'
#
# $telemetry_logger_enabled:: Enable telemetry logs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Enable telemetry logs - only useful for telemetry debugging"

#
# $telemetry_logger_enabled:: Enable telemetry logs
#
# $telemetry_logger_level:: Telemetry logs level
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Telemetry debugging logs level"

@ares
Copy link
Member Author

ares commented Apr 10, 2018

Updated parameters docs according to suggestions

@@ -303,6 +317,13 @@
Enum['none', 'plain', 'login', 'cram-md5'] $email_smtp_authentication = $::foreman::params::email_smtp_authentication,
Optional[String] $email_smtp_user_name = $::foreman::params::email_smtp_user_name,
Optional[String] $email_smtp_password = $::foreman::params::email_smtp_password,
Optional[String] $telemetry_prefix = $::foreman::params::telemetry_prefix,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's a default, it can't be undef anymore so this can be String (technically users can do this via hiera, but let's ignore that). This is true for all the added parameters.

@ares ares force-pushed the fix/23101 branch 2 times, most recently from e5b7f75 to 398f632 Compare April 10, 2018 10:37
@@ -302,7 +316,14 @@
Optional[String] $email_smtp_domain = $::foreman::params::email_smtp_domain,
Enum['none', 'plain', 'login', 'cram-md5'] $email_smtp_authentication = $::foreman::params::email_smtp_authentication,
Optional[String] $email_smtp_user_name = $::foreman::params::email_smtp_user_name,
Optional[String] $email_smtp_password = $::foreman::params::email_smtp_password,
String $email_smtp_password = $::foreman::params::email_smtp_password,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you didn't intend to change this line.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, certainly not, sorry :-)

@mmoll
Copy link
Contributor

mmoll commented Apr 10, 2018

Doesn't this mean per default telemetry data will get send to localhost, no matter if anything is running there?

@mmoll
Copy link
Contributor

mmoll commented Apr 10, 2018

ah, nope... it's only the configuration, it's still disabled 👍

@mmoll mmoll merged commit e29025f into theforeman:master Apr 10, 2018
@mmoll
Copy link
Contributor

mmoll commented Apr 10, 2018

meregd, díky @ares!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants