Spring Boot

Axibase Time Series Database has a storage driver for Spring Boot.

You can find the ATSD Spring Boot Storage Driver on GitHub.


NameRequiredDefault ValueDescription
metrics.export.urlNohttp://localhost:8088/api/v1/commandATSD API URL
metrics.export.usernameYesATSD Username
metrics.export.passwordYesATSD Password
metrics.export.bufferSizeNo64Size of metrics buffer. Metrics writer flushes the buffer if it is full or by schedule (configured by spring.metrics.export.* properties)
metrics.names.entityNoatsd-defaultEntity name
metrics.names.metricPrefixNoA prefix to be added to original metric name
metrics.names.tags.*NoOptional set of key-value pairs in ATSD time series identifier


Configuration settings are specified in the application.properties file.

application.properties file example:

metrics.export.username: admin
metrics.export.password: secret
metrics.export.url: http://localhost:8088/api/v1/command
metrics.export.bufferSize: 16
metrics.names.entity: spring-boot-sample
metrics.names.metricPrefix: spring-boot
metrics.names.tags.organization: Axibase


In order for the application to know about metrics.export. and metrics.names. they need to be specified in the configuration: AtsdNamingStrategy and AtsdMetricWriter

Enable public metrics export:

	public MetricsEndpointMetricReader metricsEndpointMetricReader(MetricsEndpoint metricsEndpoint) {
		return new MetricsEndpointMetricReader(metricsEndpoint);
	public MetricWriter atsdMetricWriter() {
		AtsdMetricWriter writer = new AtsdMetricWriter();
		return writer;
	public AtsdNamingStrategy namingStrategy() {
		return new DefaultAtsdNamingStrategy();
Wrapping methods using custom metrics.

Wrap all class methods using custom metrics:

public class JdbcCityRepository implements CityRepository

Wrap a single methods using custom metrics: