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

By default downsample all metrics for aggregated cluster namespaces #890

Merged
merged 7 commits into from
Sep 12, 2018

Conversation

robskillington
Copy link
Collaborator

No description provided.

if attrs.MetricsType == storage.AggregatedMetricsType {
downsampleOpts, err := opts.DownsampleOptions()
if err != nil {
logger.Fatal("unable to resolve downsample options",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: could you bubble the error up and fatal in main/run

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure thing.

@@ -32,7 +32,8 @@ clusters:
# We created a namespace called "default" and had set it to retention "48h".
- namespace: default
retention: 48h
storageMetricsType: unaggregated
resolution: 1m
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe add a little blurb that this is optional and what it does

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hm, this was an oopsy, I didn't mean to make this aggregated hah.

@@ -63,7 +63,8 @@ func NewDownsampler(

func (d *downsampler) NewMetricsAppender() MetricsAppender {
return newMetricsAppender(metricsAppenderOptions{
agg: d.agg.aggregator,
agg: d.agg.aggregator,
Copy link
Collaborator

Choose a reason for hiding this comment

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

weird that this didn't align, did go fmt break on this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Honestly, no idea. gofmt was the tool that aligned it like this. Let's just leave it for now since that how it wants to align it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yep fair enough

@codecov
Copy link

codecov bot commented Sep 11, 2018

Codecov Report

Merging #890 into master will decrease coverage by <.01%.
The diff coverage is 38.2%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #890      +/-   ##
==========================================
- Coverage   78.34%   78.33%   -0.01%     
==========================================
  Files         396      396              
  Lines       33591    33654      +63     
==========================================
+ Hits        26316    26363      +47     
- Misses       5468     5484      +16     
  Partials     1807     1807
Flag Coverage Δ
#dbnode 81.48% <ø> (+0.13%) ⬆️
#m3ninx 71.93% <ø> (ø) ⬆️
#query 67.6% <38.2%> (-0.49%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be7938e...1613369. Read the comment docs.

@@ -32,7 +32,7 @@ clusters:
# We created a namespace called "default" and had set it to retention "48h".
- namespace: default
retention: 48h
storageMetricsType: unaggregated
type: unaggregated
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this going to be b/w compatible? main concern is if skipping specifying this field be the same as unaggregated?

Copy link
Collaborator Author

@robskillington robskillington Sep 11, 2018

Choose a reason for hiding this comment

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

Hm, I'll add a support for both to be used in a backwards compatible way. Ugh, good catch.

Retention time.Duration `yaml:"retention" validate:"nonzero"`
Resolution time.Duration `yaml:"resolution" validate:"min=0"`
Namespace string `yaml:"namespace"`
Type storage.MetricsType `yaml:"type"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

re: our conversation about deprecated, looks like there is a convention for this in Go already: https://go-review.googlesource.com/c/blog/+/18956/2/content/godoc-documenting-go-code.article

prateek
prateek previously approved these changes Sep 11, 2018
Copy link
Collaborator

@prateek prateek left a comment

Choose a reason for hiding this comment

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

LGTM

@robskillington
Copy link
Collaborator Author

robskillington commented Sep 12, 2018

Did not mean to "dismiss stale review" and will merge this based on @prateek's sign off.

@robskillington robskillington merged commit 721ac92 into master Sep 12, 2018
@robskillington robskillington deleted the r/add-aggregated-namespace-auto-mapping-rules branch September 12, 2018 13:31
@robskillington robskillington changed the title Add option and enable by default downsampling all metrics for an aggregated cluster namespace By default downsample all metrics for aggregated cluster namespaces Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants