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

Rename *.time metrics to *.time.ms #6449

Merged
merged 2 commits into from
Mar 13, 2018

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Feb 22, 2018

The following renames are done as requested by @tsullivan in https://github.com/elastic/x-pack-kibana/issues/4644#issuecomment-367526912:
beat.cpu.system.time -> beat.cpu.system.time.ms
beat.cpu.user.time -> beat.cpu.user.time.ms
beat.cpu.total.time -> beat.cpu.total.time.ms

I am not sure if it's ok to rename these metrics, as they are already released. I am closing if we decide against renaming.

EDIT: the following counters can be access like this: event["beat"]["cpu"]["user"]["time"]["ms"], etc.

@ph
Copy link
Contributor

ph commented Feb 22, 2018

I think we should add the new one keep the older and remove them in 7.

@ph
Copy link
Contributor

ph commented Feb 22, 2018

Sending the old fields along the new field will probably break old version of x-pack?

@kvch
Copy link
Contributor Author

kvch commented Feb 22, 2018

@ph @tsullivan and me agreed on Slack that it's ok to rename those fields. In XPack CPU usage metrics appear in 6.3 first. Possible existing users of these metrics were already be warned that field names might change between releases.

@@ -122,16 +122,16 @@ func reportBeatCPU(_ monitoring.Mode, V monitoring.Visitor) {

monitoring.ReportNamespace(V, "user", func() {
monitoring.ReportInt(V, "ticks", int64(cpuTicks.User))
monitoring.ReportInt(V, "time", userTime)
monitoring.ReportInt(V, "time_ms", userTime)
Copy link
Member

Choose a reason for hiding this comment

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

Can we go with time.ms to follow our metricbeat convention?

Copy link
Member

Choose a reason for hiding this comment

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

Would that allow the field name of the monitoring document to keep the time_ms name?

Copy link
Member

Choose a reason for hiding this comment

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

@tsullivan I assume the metrics in the monitoring document are in sync with what we have here so it's time?

Copy link
Member

Choose a reason for hiding this comment

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

@ruflin the concern with naming the field time is that it's ambiguous on whether this is a measure of milliseconds or a unix epoch value. That's our x-pack monitoring data mappings don't have any fields named time and we want to stay consistent with that practice.

Whether it is time_ms or time.ms is fine with me. My concern with time.ms is that the dot should represent a path in the json, not a dot in the field name.

@ruflin
Copy link
Member

ruflin commented Mar 13, 2018

@kvch Can you modify this PR to make time.ms but make sure it's a path and not a dot in the field name?

@kvch kvch force-pushed the feature/libbeat/rename-cpu-time branch from caf6cc1 to 4683def Compare March 13, 2018 11:08
@kvch
Copy link
Contributor Author

kvch commented Mar 13, 2018

@ruflin Done. I am not sure if a changelog entry is needed, but I added one. If it's not required here, I will drop the commit.

Copy link
Member

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

WFG

Changelog entry can not hurt even though I don't expect anyone to consume the data with his own queries.

@@ -23,6 +23,7 @@ https://github.com/elastic/beats/compare/v6.0.0-beta2...master[Check the HEAD di
- De dot keys of labels and annotations in kubernetes meta processors to prevent collisions. {pull}6203[6203]
- The default value for pipelining is reduced to 2 to avoid high memory in the Logstash beats input. {pull}6250[6250]
- Add logging when monitoring cannot connect to Elasticsearch. {pull}6365[6365]
- Rename beat.cpu.*.time_ms metrics to beat.cpu.*.time.ms. {pull}6449[6449]
Copy link
Member

@andrewkroh andrewkroh Mar 14, 2018

Choose a reason for hiding this comment

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

Is beat.cpu.*.time_ms correct? Should that be beat.cpu.*.time?

Updating the PR title to match the final change would be good as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it's not correct. Fun.

@ruflin ruflin changed the title Rename *.time metrics to *.time_ms Rename *.time metrics to *.time.ms Mar 22, 2018
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.

5 participants