What gets persisted in Cassandra for every API call?

Not applicable

I was referring https://community.apigee.com/questions/45184/access-logs-for-every-request-in-apigee.html and understood that API requests(POST) and response messages are not persisted.

However, I have a requirement to persist a specific HTTP header value for root cause analysis which can be later consumed by ELK stack.

I am trying to avoid using Message Logging Policy and hoping that this value can be found in the raw data being persisted in Cassandra.

Any suggestions on how to handle it?

1 4 2,521
4 REPLIES 4

Not applicable

Mmmmm, ok, let's see.

First, there's nothing stored in Cassandra for every API call.

Under the current architecture, Cassandra is the meta-data store for configuration data and other things in Apigee Edge. This means that when you configure an API Proxy, that information is stored in Cassandra. When you define a new API Product , Cassandra. A new developer, a new developer app, a new KVM entry ==> C*.

In general, as API requests are handled by API proxies, nothing new is added to Cassandra. There are a few exceptions:

  • If you use OAuthV2/GenerateAccessToken (or GenerateAuthorizationCode), THAT gets stored in C*
  • If you use a KeyValueMapOperations / PUT policy, THAT gets written to Cassandra.

OK, that's just a little bit of background information.

As for your specific question - "storing" a specific HTTP Header somewhere to allow for later analysis... I'd say the MessageLogging policy is exactly the right tool for that job. Of course, Logstash (part of the ELK stack) now has an HTTP Input listener. This means you could also use a JavaScript fire-and-forget callout to send the data directly to Logstash, if you have that listener enabled in your setup. Then you would not need MessageLogging.

@Dino. Thanks for the response. Will try logging to LogStash directly.

Hi @Dino,


Does Apigee run time traffic will call Cassandra on every request to fetch KVM ?

How and where the KVM data stored and fetched at the time of API run time traffic ?

Thanks in Advance!