Skip to content

Document that application.conf is not read by default when using the Cassandra auto-configuration #21787

@Esakkimuthu991

Description

@Esakkimuthu991

CqlSession.getMetrics() returning null value, even after configuration for enabling the metrics has been added to it.

@Autowired
private CqlSession cqlsession;

MetricRegistry metricRegistry = cqlsession.getMetrics()
            .orElseThrow(() -> new IllegalArgumentException("not able to get metrics"))
            .getRegistry();

application.properties:

datastax-java-driver.advanced.metrics {
  session.enabled = [connected-nodes, cql-requests]
  node.enabled = [pool.open-connections, pool.in-flight]
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions