Database Reference
In-Depth Information
CHAPTER 23
■ ■ ■
Application Instrumentation
and End-to-End Tracing
T he Oracle Database Performance Tuning Guide 10g Release 2 and the Oracle Call Interface
Programmer's Guide 10g Release 2 describe a feature called end-to-end application tracing.
The Oracle Database JDBC Developer's Guide and Reference 10g Release 2 documents end-to-
end metrics support in JDBC. The Oracle Database Concepts 10g Release 2 manual presents a
feature called end-to-end monitoring. These three terms refer to the same set of tracing, moni-
toring, and application instrumentation features. The feature set is implemented with three
application programming interfaces (OCI, PL/SQL, Java/JDBC), dictionary views, V$ dynamic
performance views, and SQL trace. Instrumentation is leveraged by the Active Workload
Repository, Active Session History, Statspack, Enterprise Manager, the database resource
manager, and the TRCSESS utility. The undocumented aspects surrounding this set of features
are so numerous that I refrain from listing them all. 1 For example, it is undocumented that a
shared server process does not re-emit instrumentation entries to SQL trace files as it services
different sessions. This may lead to incorrect results when a shared server process' SQL trace
file, which contains several sessions, is processed with TRCSESS.
A complete instrumentation case study that points out the benefits seen in the aforemen-
tioned components and addresses undocumented aspects, such as the SQL trace file entries
written by JDBC end-to-end metrics, is presented. A work-around that avoids incorrect results
with TRCSESS in a Shared Server environment is suggested. An example of the integration
between application instrumentation and the resource manager, which provides the undocu-
mented syntax for assigning a resource group based on service name, module, and action, is
also included. Finally, backward compatibility of TRCSESS with Oracle9 i is discussed.
Introduction to Instrumentation
According to Wikipedia, “instrumentation refers to an ability to monitor or measure the level
of a product's performance, to diagnose errors and write trace information. […] In programming,
instrumentation means the ability of an application to incorporate:
The Java source file ApplicationInstrumentation.java in the source code depot lists ten undocu-
mented aspects.
1.
251
 
Search WWH ::




Custom Search