Skip to content

Conversation

@jkschneider
Copy link
Contributor

At some point when all the individual implementation configurations were changed to auto-configurations in Boot 2, the conditionalization of the config based on managament.metrics.export.simple.enabled was dropped. It existed previously so that users could flip off even in-memory metrics collection, leaving an empty CompositeMeterRegistry that was essentially a NOOP (see CompositeMeterRegistryPostProcessorTests#registerWhenHasNoMeterRegistryShouldRegisterEmptyComposite).

See #12089 (comment)

}

@Override
public boolean enabled() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Having this property at all in SimpleConfig was a mistake. When this is merged, I'll remove it.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 18, 2018
@snicoll snicoll self-assigned this Feb 18, 2018
* Enable in-memory metrics that aren't published anywhere (allows you to see
* what metrics are collected in the metrics actuator endpoint).
*/
private boolean enabled;
Copy link
Member

Choose a reason for hiding this comment

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

The default value here should be true. And we shouldn't have a property at all since it's not used anywhere in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I guess adding it to additional-spring-configuration-metadata.json accomplishes the same.

/**
* Enable publishing to the backend.
* Enable in-memory metrics that aren't published anywhere (allows you to see
* what metrics are collected in the metrics actuator endpoint).
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 that's a bit misleading and we should rephrase that.

@snicoll snicoll added type: enhancement A general enhancement priority: normal and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 19, 2018
@snicoll snicoll closed this in 1dab83a Feb 19, 2018
snicoll added a commit that referenced this pull request Feb 19, 2018
* pr/12106:
  Polish "Restore behavior of management.metrics.export.simple.enabled"
  Restore behavior of management.metrics.export.simple.enabled
@snicoll snicoll added this to the 2.0.0.RC2 milestone Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants