Skip to main content
Skip table of contents

Id-Based Correlation

Feature

ID-Based correlation mechanism is used for end-to-end transaction tracing.

Here are two common use cases it is often used for (but not limited to).

Use Cases

User Click Tracing

(User Click>network>backend apps>db sql... correlation)

Correlation of a User Click down to any transactions that are triggered by that click e.g. network request, application api call, database sql, etc. Correlation IDs are injected at different start points (ex: User action in browser) and are carried along to other services. Each service that is monitored by one of our agents will pick up the ID, tag any data collected with said ID, and pass it along to further services (ex: when making outbound requests). Typically the easiest to set up, provided that we can monitor all / most applications / services across an environment. 

Service Tracing

Services calls/transactions often need to be traced, similarly to the above, the Germain components (js, agent, engine..) are built to support these kinds of transaction tracing. 

Example: Tracing of AngularJS-NodeJS-MySQL Transaction

In this example, we have a multi-tier web application which the user interacts with through the browser. The application UI is generated by a server-side NodeJS application which makes requests to a Java backend service. The Java service interacts with a database as well as MQ services.

The ID-based correlation happens automatically by injecting Germain JS Script (for Real User Monitoring). This mechanism produces a unique correlation ID into each request made from that Angular UI. The Germain Agent (in this case for "NodeJS") receives the correlation IDs and passes it along down the line as part of requests made to the Java backend services. The Java monitoring agent records SQL queries and messages sent to MQ.

Setup

  1. Inject the Germain monitoring scripts into Angular JS web application (see User Experience Monitoring)

    Once the Germain monitoring scripts are included in a web application, they will automatically add a correlation header to each outgoing XHR request made by the web browser. 
    Then the UX monitoring will create a data point for the user activity (i.e., navigation, click, etc) as well as for any HTTP requests that were part of it.

  2. Deploy the Germain NodeJS agent  (see Node.js Monitoring)
    The Germain Java NodeJS instruments Inbound and Outbound HTTP requests, which will collect and pass along the correlation ID from UX monitoring to the next layer being monitored. The NodeJS agent supports collection of a number of useful metrics and the creation of custom transactions/events/metrics via our API.

  3. Deploy the Germain Java agent with each Java service (see Java/Jvm Monitoring)
    The Germain Java agent provides instrumentation to for a number of well-known interface points:

    1. Inbound HTTP requests (via Servlet and Filter APIs)

    2. Outbound HTTP requests (via HttpUrlConnection)

    3. SQL Queries (JDBC)

    4. MQ messaging (JMS)

  4. Beyond these default points, the agent can be configured to instrument the execution of any custom Java class / method.
    When the agent records an inbound HTTP request which includes the Germain correlation header, it attach the correlation ID to any transactions and events generated in the context of the HTTP request. For example, if the request triggers the execution of a SQL statement, the agent will record the query text as well as associated metrics as a data point that is tagged with the correlation ID.
    Similarly, if the request triggers a message to be sent via JMS broker, the agent will record this operation as a data point in Germain including the correlation ID. Further, it will annotate the message to include the correlation ID, so that the recipient services further downstream can also be correlated, assuming it is also monitored by one of the Germain agents.

Component: Engine
Service: Analytics

Feature Availability: 8.6.0 or later

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.