Package com.jitlogic.zorka.core.spy.plugins

Examples of com.jitlogic.zorka.core.spy.plugins.TraceAttrProcessor


     * @param attrTag  attribute tag;
     * @param srcField source field name (from spy record)
     * @return spy processor object adding new trace attribute
     */
    public SpyProcessor attr(String attrName, String attrTag, String srcField) {
        return new TraceAttrProcessor(symbolRegistry, tracer, TraceAttrProcessor.FIELD_GETTING_PROCESSOR,
                srcField, attrName, attrTag);
    }
View Full Code Here


                srcField, attrName, attrTag);
    }


    public SpyProcessor traceAttr(String traceName, String attrName, String attrTag, String srcField) {
        return new TraceAttrProcessor(symbolRegistry, tracer, TraceAttrProcessor.FIELD_GETTING_PROCESSOR,
                srcField, traceName, attrName, attrTag);
    }
View Full Code Here

     * @param attrTag   attribute tag;
     * @param srcFormat source field name (from spy record)
     * @return spy processor object adding new trace attribute
     */
    public SpyProcessor formatAttr(String attrName, String attrTag, String srcFormat) {
        return new TraceAttrProcessor(symbolRegistry, tracer, TraceAttrProcessor.STRING_FORMAT_PROCESSOR,
                srcFormat, attrName, attrTag);
    }
View Full Code Here

                srcFormat, attrName, attrTag);
    }


    public SpyProcessor formatTraceAttr(String traceName, String attrName, String attrTag, String srcFormat) {
        return new TraceAttrProcessor(symbolRegistry, tracer, TraceAttrProcessor.STRING_FORMAT_PROCESSOR,
                srcFormat, traceName, attrName, attrTag);
    }
View Full Code Here

public class TraceAttrProcessingUnitTest extends BytecodeInstrumentationFixture {

    @Test
    public void testTraceUntaggedAttr() {

        new TraceAttrProcessor(symbols, tracerObj, TraceAttrProcessor.FIELD_GETTING_PROCESSOR, "SQL", null, "SQL", null).process(
                ZorkaUtil.<String, Object>map("SQL", "select * from table"));

        traceBuilder.check(0, "action", "newAttr", "attrId", symbols.symbolId("SQL"));
        traceBuilder.check(0, "attrVal", "select * from table");
    }
View Full Code Here

    }


    @Test
    public void testTraceFormattedAttr() {
        new TraceAttrProcessor(symbols, tracerObj, TraceAttrProcessor.STRING_FORMAT_PROCESSOR, "${SQL} GO", null, "SQL", null).process(
                ZorkaUtil.<String, Object>map("SQL", "select 1"));

        traceBuilder.check(0, "action", "newAttr", "attrId", symbols.symbolId("SQL"));
        traceBuilder.check(0, "attrVal", "select 1 GO");
    }
View Full Code Here

    }


    @Test
    public void testTraceTaggedAttr() {
        new TraceAttrProcessor(symbols, tracerObj, TraceAttrProcessor.FIELD_GETTING_PROCESSOR, "SQL", null, "SQL", "SQL_QUERY").process(
                ZorkaUtil.<String, Object>map("SQL", "select * from table"));

        traceBuilder.check(0, "action", "newAttr", "attrId", symbols.symbolId("SQL"));
        traceBuilder.check(0, "attrVal", new TaggedValue(symbols.symbolId("SQL_QUERY"), "select * from table"));
    }
View Full Code Here

TOP

Related Classes of com.jitlogic.zorka.core.spy.plugins.TraceAttrProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.