Skip to content

Home

Development

IDEs

API Explorer

Quick start tutorial: Logging and viewing transactions

Estimated time to complete: 5-7 minutes

Martini allows you to log service invocations that have occurred within the server using Tracker1. This data can then be used for generating reports, auditing, and troubleshooting.

Tracker is a fully-indexed logging engine that allows you to quickly and easily search for data that's been sent to and received by Martini. In this tutorial, you'll be taught how to log service invocations programmatically using a one-liner, and how to view the resulting document in the Tracker user interface.

Create the data-logging service

Services can be invoked from various places. This includes endpoints, over HTTP, and other services. For each of these types of invocations, Martini provides logging capabilities to Tracker.

To keep the tutorial short, this page will only discuss how you can log an invocation from a service. This is done by calling any of the TrackerMethods.addDocument(...) one-liners.

Consider the following service:

A service calling `TrackerMethods.addDocument`

A service calling `TrackerMethods.addDocument`

It only calls the addDocument(...) method, and provides the one-liner's arguments by mapping the service's input properties.

Because the service invocation will be logged programmatically, it is up to the developer to map the required values for the operation. In most cases, such as when logging data via an endpoint, Martini will automatically populate the resulting Tracker document for you with sensible, default values.

Invoke the data-logging service

After configuring this service, you will be able to invoke it, causing a Tracker document to be added to the Tracker search index. This page will invoke the service via the Martini IDE. To do this:

Invoking the service

Invoking the service

  1. Open the service by double-clicking it from the Navigator.
  2. Click the run button on the toolbar.
  3. Provide the inputs required by the service.
  4. Click Run.

View the document

After a few seconds, Martini will commit the document to the index. This means the Tracker document produced by your call to the one-liner can now be viewed. To do this:

Viewing document

Viewing document

  1. Open the Tracker view by clicking the Tracker button on the toolbar.
  2. If you don't have other logging operations ongoing, your document will appear as the top most entry. If you're having a hard time finding your document, use the search bar.
  3. Double click your document in order to view more details.

  1. You can also use the invoke monitor for this purpose. However, the invoke monitor is better suited for monetization and throttling