DX Application Performance Management

Expand all | Collapse all

Custom pbd not picking metrics to display in investigator tree

Jump to Best Answer
  • 1.  Custom pbd not picking metrics to display in investigator tree

    Posted 02-27-2013 11:01 AM

    I wrote below lines of code in existing custom pbd. But it is not showing any of these metrics in investigator tree. Actually *** node is not appearing under YY node. I have checked in autoprobe.log
    and can see that this class is being instrumented. All other metrics are appearing properly.

    ## ***
    TurnOn: ***
    SetFlag: ***
    IdentifyInheritedAs: com.xx.yyy.zzz.Class1 ***
    IdentifyClassAs: com.xx.yyy.zzz.Class1 ***

    TraceComplexMethodsIfFlagged: *** BlamedMethodTimer "YY|***|{classname}|{method}:Average Method Invocation Time (ms)"
    TraceComplexMethodsIfFlagged: *** BlamedPerIntervalCounter "YY|***|{classname}|{method}:Method Invocations Per Interval"
    TraceComplexMethodsIfFlagged: *** ConcurrentInvocationCounter "YY|***|{classname}|{method}:Concurrent Method Invocations"

    Can someone help me on this?


  • 2.  RE: Custom pbd not picking metrics to display in investigator tree
    Best Answer

    Posted 02-27-2013 11:24 AM
    If I had to guess, one of two scenarios is possibly going on.

    Scenario 1: The methods you are trying to instrument are not getting invoked; code must execute to produce metrics.
    Scenario 2: You are instrumenting too high up in the inheritance tree. For intance, let's say c[font=Courier New]om.xx.yyy.zzz.Class1[font] is an interface or abstract class (I assume abstract class, since you're using [font=Courier New]IdentifyInheritedAs[font] and [font=Courier New]IdentifyClassAs[font] both). By default, all direct descendents (subclasses or implementations) from this class will be modified by ProbeBuilder and added to the specified tracer group. For example, let's assume a class hierarchy in which [font=Courier New]Class2[font] extends [font=Courier New]Class1[font], and [font=Courier New]Class3[font] extends [font=Courier New]Class2[font], like so:

    [font=Courier New]com.xx.yyy.zzz.Class1[font]
    [font=Courier New]└ com.xx.yyy.zzz.Class2[font]
    [font=Courier New]└ com.xx.yyy.zzz.Class3[font]
    When you instrument by inheritance for [font=Courier New]Class1[font], [font=Courier New]Class2[font] is instrumented because it explicitly extends [font=Courier New]Class1[font]. However, Introscope does not by default instrument [font=Courier New]Class3[font] because [font=Courier New]Class3[font] does not explicitly extend [font=Courier New]Class1[font]. So, if the methods that you are targeting are defined in [font=Courier New]Class3[font], your current PBD might not be getting applied. To instrument [font=Courier New]Class3[font] you must either explicitly identify [font=Courier New]Class3[font] (either directly or using inheritance starting at [font=Courier New]Class2[font]) or by enabling AutoProbe hierarchy support.

    For more information on Scenario 2, the following links might help:

    Instrumenting and inheritance
    Multiple inheritance
    Enable instrumentation of multiple levels of subclasses
    Support for multiple inheritance, interfaces, and abstract methods