November 10th, 2021

Announcing: Glowroot support for Azure Cosmos DB Cassandra API

Iria Osara
Program Manager

We are excited to announce that support for Glowroot is now generally available for the Azure Cosmos DB Cassandra API. Glowroot is an open-source APM tool for monitoring the performance of your Java-based applications.

This support was brought about by the addition of three new features for Azure Cosmos DB Cassandra API: lightweight transactions, named indexes, and truncate. Using Glowroot with Azure Cosmos DB is easy to configure, has no need to update applications, and has a low overhead in terms of resource utilization. This allows users of Azure Cosmos DB’s Cassandra API to get all the benefits of using Glowroot, and for Glowroot users to enjoy the fully managed Azure Cosmos DB Cassandra API.

Features 

Glowroot comes in two flavors one as an embedded collector that is great for monitoring stand-alone applications and the other is a central collector useful for distributed architecture applications systems. Some of the major features include:

  • Enables you to trace slow requests for up to 500 requests and capture the errors.
  • Supports asynchronous requests across multiple threads.
  • You can configure alerts based on your app’s requirements.
  • Allows for SQL Capture which is the monitoring of SQL queries sent over the network or to a local database server.
  • Responsive UI to view time taken for each transaction, which is aggregated over time with percentile chart for response time.

             Glowroot                                                       Glowroot with Cassandra API

Glowroot without Azure Cosmos DB Cassandra API                Glowroot with Azure Cosmos DB Cassandra API

 

Metrics Captured

Some of the top metrics captured are:

  1. The APIs (Application Programming Interfaces) average response time taken.
  2. The applications Memory/CPU usage.
  3. Error details which help gather root causes that affect the applications performance.

Image Glowroot user interface

 

Azure Cosmos DB Cassandra API New Features 

The Azure Cosmos DB Cassandra API has added three new features, lightweight transactions, named indexes, and truncate that will help support Glowroot. 

Named Indexes 

This is defining a new index with a name on a single column. For columns with existing data, Cassandra can index the data during the statement execution. Once the index has been created, during data insertion, Cassandra automatically indexes the data. 

CREATE TABLE company.employees ( 
     alias text, 
     firstName text, 
     lastName text, 
     email text, 
     homeAddress text, 
     zip int, 
     state text, 
     PRIMARY KEY (userID) 
 );

Index creation using a name example

CREATE INDEX user_alias ON company.employees (alias);

Index creation without a name example 

CREATE INDEX ON company.employees (alias);

Truncate 

Using the TRUNCATE command to permanently delete all the rows of a table. The table structure remains but all the data has been deleted. Currently, truncate is in private preview. Please reach out to Azure Cassandra API team, if you would like to have this enabled on your account. Truncate command can be called as TRUNCATE or TRUNCATE TABLE.

TRUNCATE TABLE company.employees; 

TRUNCATE company.employees;
cqlsh:tp> select * from company.employees; 

alias | firstName | lastName | email| homeAddress | zip | state 
------+---------+----------+------+-----------+-----+------ 

(0 rows)

Light Weight Transaction (LWT) 

Cassandra API already supports LWT, now we support other conditions DELETE and UPDATE conditions. LWT is useful for performance for cases where you require a read-before-write.

INSERT INTO company.employees (alias, email)  
VALUES ('Nancy', 'Nancy@outlook.com') 
IF NOT EXISTS; 

Getting Started 

Author

Iria Osara
Program Manager

Iria is a Program Manager within the Azure Cosmos DB team. Iria is passionate about cloud computing, big data and helping the developer/data community understand more about Cosmos DB.

0 comments

Discussion are closed.