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

[feature] adding metric util and metric filter #17

Merged
merged 4 commits into from
Feb 18, 2024

Conversation

shahryarSafizadeh
Copy link
Contributor

PRD-221992


@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty(value = "metric.util.enable", havingValue = "true")
Copy link
Collaborator

Choose a reason for hiding this comment

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

util doesn't need enable disable

http.log.format=json

meter.util.enable=true
Copy link
Collaborator

Choose a reason for hiding this comment

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

this property is not needed meter.util.enable=true

@ConditionalOnMissingBean
@ConditionalOnProperty(value = "metric.filter.enable", havingValue = "true")
public MeterFilter meterFilter(MeterFilterConfig meterFilterConfig) {
return new MeterFilter() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

defining anonymous class here is not appropriate

* @since 2/13/2024
*/
public class GaugeValue {
private int value = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it thread safe?

@Validated
public class MeterFilterConfig {

private String[] filteredMeterNames;
Copy link
Collaborator

Choose a reason for hiding this comment

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

using excluded in parameter names ?

}
gaugeMeters.put(createKey(metricName, tags), gaugeValue);
return gauge;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

README?

}
}
return null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

error log no meter type is selected

@minakh1993 minakh1993 merged commit 7cfcf6b into Tosan:spring-boot2 Feb 18, 2024
1 check passed
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