<commit_before># TracEE 0.7.0
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.tracee/tracee-parent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.tracee/tracee-parent)
[![Stories in Ready](https://badge.waffle.io/tracee/tracee.png?label=ready&title=Ready)](https://waffle.io/tracee/tracee)
[![Build Status](https://api.travis-ci.org/tracee/tracee.svg)](https://travis-ci.org/tracee/tracee)
[![Coverage Status](https://img.shields.io/coveralls/tracee/tracee.svg)](https://coveralls.io/r/tracee/tracee?branch=master)

TL;DR, watch our [5 minutes slide deck](http://www.tracee.io/docs/slides/#/)

> __TracEE makes it easy to track the invocation context throughout your distributed JavaEE-Application logs. It does not force
> you to manually pass around collaboration-ids but instead uses side-channels on the underlying protocols and therefore
> encapsulates the aspect of invocation context propagation.__

You may already aggregate all your application logs at a single place (using graylog, logstash+kibana or others) but it is still
complicated to gather relevant log entries that belong to a certain interaction with your system.

*TracEE* is an integration framework that eases this kind of interaction monitoring of JavaEE applications by passing contextual information
through your whole system and makes them visible in your logs. Therefore it contains adapters or interceptors for the most popular JavaEE technologies:

* servlet 2.5+
* jax-ws
* jax-rs2
* jms

Also supported are these common and widespread frameworks:

* Spring MVC
* Spring Web (RestClients)
* Apache CXF

This project is still in an experimental stage and the api may change during further development.

# Getting started

## The Invocation Context

So what is this all about?

An example:

- A user opens your JavaEE enterprisey hotel booking page in a browser
- Your servlet container renders a calendar and room selection
- The user selects a date and a tasty breakfast and clicks on _book_
- Your servlet starts to chat with your full-blown EE-Server
- _Awesome stuff happens_, EJBs, SOAP- and REST-Services are called, databases are read and written
- Finally the user sees a confirmation page and receives a booking confirmation via email

This is the happy path. But what if something goes wrong? Lets name it: Exception stack trace in the log files.
The stack trace often shows a very narrow scope of what went wrong, namely the current thread.

An __invocation context__ is a temporal or logical boundary in which a system invocation happens.
Since each system invocation may cause further system interactions, every subsequent system invocation logically belongs to the
same context as the invoking interaction.

An example for an invocation context in a servlet based application would be a HTTP-Request. Every system interaction
that is directly or indirectly caused by a browser asking a servlet-container lies within the context of its HTTP-Request.
<commit_msg>Apache HttpClient is also supported [skip ci]<commit_after># TracEE 0.7.0
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.tracee/tracee-parent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.tracee/tracee-parent)
[![Stories in Ready](https://badge.waffle.io/tracee/tracee.png?label=ready&title=Ready)](https://waffle.io/tracee/tracee)
[![Build Status](https://api.travis-ci.org/tracee/tracee.svg)](https://travis-ci.org/tracee/tracee)
[![Coverage Status](https://img.shields.io/coveralls/tracee/tracee.svg)](https://coveralls.io/r/tracee/tracee?branch=master)

TL;DR, watch our [5 minutes slide deck](http://www.tracee.io/docs/slides/#/)

> __TracEE makes it easy to track the invocation context throughout your distributed JavaEE-Application logs. It does not force
> you to manually pass around collaboration-ids but instead uses side-channels on the underlying protocols and therefore
> encapsulates the aspect of invocation context propagation.__

You may already aggregate all your application logs at a single place (using graylog, logstash+kibana or others) but it is still
complicated to gather relevant log entries that belong to a certain interaction with your system.

*TracEE* is an integration framework that eases this kind of interaction monitoring of JavaEE applications by passing contextual information
through your whole system and makes them visible in your logs. Therefore it contains adapters or interceptors for the most popular JavaEE technologies:

* servlet 2.5+
* jax-ws
* jax-rs2
* jms

Also supported are these common and widespread frameworks:

* Spring MVC
* Spring Web (RestClients)
* Apache HttpClient 3 / 4
* Apache CXF

This project is still in an experimental stage and the api may change during further development.

# Getting started

## The Invocation Context

So what is this all about?

An example:

- A user opens your JavaEE enterprisey hotel booking page in a browser
- Your servlet container renders a calendar and room selection
- The user selects a date and a tasty breakfast and clicks on _book_
- Your servlet starts to chat with your full-blown EE-Server
- _Awesome stuff happens_, EJBs, SOAP- and REST-Services are called, databases are read and written
- Finally the user sees a confirmation page and receives a booking confirmation via email

This is the happy path. But what if something goes wrong? Lets name it: Exception stack trace in the log files.
The stack trace often shows a very narrow scope of what went wrong, namely the current thread.

An __invocation context__ is a temporal or logical boundary in which a system invocation happens.
Since each system invocation may cause further system interactions, every subsequent system invocation logically belongs to the
same context as the invoking interaction.

An example for an invocation context in a servlet based application would be a HTTP-Request. Every system interaction
that is directly or indirectly caused by a browser asking a servlet-container lies within the context of its HTTP-Request.

{'fraction_non_alphanumeric': 0.0668210387032749, 'fraction_numerical': 0.0026463777704267286, 'mean_word_length': 4.8481624758220505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 16, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '550404', 'n_tokens_mistral': 1644, 'n_tokens_neox': 1557, 'n_words': 752}