com.newrelic.api.agent.weaver.Weaver.callOriginal()

Here are the examples of the java api com.newrelic.api.agent.weaver.Weaver.callOriginal() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

919 Examples 7

19 Source : Weave_OriginalNameInterface.java
with Apache License 2.0
from newrelic

public void bar() {
    foo();
    Weaver.callOriginal();
}

19 Source : ClassLoaderPackageAccessInstrumentation.java
with Apache License 2.0
from newrelic

private void checkPackageAccess(Clreplaced<?> cls, ProtectionDomain pd) {
    if (cls.isAnnotationPresent(InstrumentedClreplaced.clreplaced)) {
        return;
    }
    Weaver.callOriginal();
}

19 Source : AgentClassLoaderInstrumentation.java
with Apache License 2.0
from newrelic

/**
 * Intercept all calls to loadClreplaced() and delegate any clreplaced loads for agent, weave or API clreplacedes to use the agent's
 * ClreplacedLoader.
 *
 * @param name the name of the clreplaced we are loading
 * @return the loaded Clreplaced
 */
public Clreplaced<?> loadClreplaced(String name) {
    if (isNewRelicClreplaced(name)) {
        Clreplaced<?> clazz = loadNewRelicClreplaced(name);
        if (clazz != null) {
            return clazz;
        }
    }
    return Weaver.callOriginal();
}

19 Source : AgentClassLoaderBaseInstrumentation.java
with Apache License 2.0
from newrelic

/**
 * Intercept all calls to loadClreplaced() and delegate any clreplaced loads for agent, weave or API clreplacedes to use the agent's
 * ClreplacedLoader.
 *
 * @param name the name of the clreplaced we are loading
 * @return the loaded Clreplaced
 */
protected Clreplaced<?> loadClreplaced(String name, boolean resolve) {
    if (isNewRelicClreplaced(name)) {
        Clreplaced<?> clazz = loadNewRelicClreplaced(name);
        if (clazz != null) {
            return clazz;
        }
    }
    return Weaver.callOriginal();
}

19 Source : ModuleLoader_Instrumentation.java
with Apache License 2.0
from newrelic

public static void installMBeanServer() {
    JBossUtils.addJmx();
    Weaver.callOriginal();
}

19 Source : DeploymentManagerImpl.java
with Apache License 2.0
from newrelic

private ApplicationListeners createListeners() {
    WildflyUtil.setServerInfo();
    ApplicationListeners listeners = Weaver.callOriginal();
    listeners.addListener(new ManagedListener(new ListenerInfo(WildflyServletRequestListener.clreplaced), false));
    NewRelic.getAgent().getLogger().log(Level.FINER, "Registering request listener for {0} ", this);
    return listeners;
}

19 Source : WebApp.java
with Apache License 2.0
from newrelic

protected void registerGlobalWebAppListeners() {
    Weaver.callOriginal();
    AgentBridge.jmxApi.addJmxMBeanGroup("liberty");
    if (eventSource != null) {
        eventSource.addServletInvocationListener(new NRServletRequestListener());
        AgentBridge.getAgent().getLogger().log(Level.FINER, "Registered WebSphere Liberty Profile servlet event listener for WebApp {0}.", this.getClreplaced());
    } else {
        AgentBridge.getAgent().getLogger().log(Level.SEVERE, "Failed to register WebSphere Liberty Profile servlet event listener for WebApp {0}.", this.getClreplaced());
    }
}

19 Source : WebAppImpl.java
with Apache License 2.0
from newrelic

/**
 * We weave this method so that the clreplaced/method matcher has a reasonable method to match against.
 *
 * @return
 */
public String getServerInfo() {
    return Weaver.callOriginal();
}

19 Source : T3Srvr_Instrumentation.java
with Apache License 2.0
from newrelic

public T3ServerFuture run(String[] args) {
    if (addedJmx.compareAndSet(false, true)) {
        AgentBridge.jmxApi.addJmxMBeanGroup(JMX_PREFIX);
        AgentBridge.getAgent().getLogger().log(Level.FINER, "Added JMX for Weblogic 12.2.1+");
    }
    return Weaver.callOriginal();
}

19 Source : T3Srvr_Instrumentation.java
with Apache License 2.0
from newrelic

public static int run(String[] args) {
    if (addedJmx.compareAndSet(false, true)) {
        AgentBridge.jmxApi.addJmxMBeanGroup(JMX_PREFIX);
        AgentBridge.getAgent().getLogger().log(Level.FINER, "Added JMX for Weblogic 12");
    }
    return Weaver.callOriginal();
}

19 Source : RoutingContextImplBase_Instrumentation.java
with Apache License 2.0
from newrelic

int currentRouteNextFailureHandlerIndex() {
    return Weaver.callOriginal();
}

19 Source : RoutingContextImplBase_Instrumentation.java
with Apache License 2.0
from newrelic

void restart() {
    addHeadersEndHandler(VertxUtil.expireAndNameTxnHandler(this));
    Weaver.callOriginal();
}

19 Source : RoutingContextImplBase_Instrumentation.java
with Apache License 2.0
from newrelic

int currentRouteNextHandlerIndex() {
    return Weaver.callOriginal();
}

19 Source : Http1xServerConnection_Instrumentation.java
with Apache License 2.0
from newrelic

public HttpServerConnection handler(Handler<HttpServerRequest> handler) {
    if (handler != null) {
        // Wrap the request handler so we can start the transaction and start tracking child threads
        handler = VertxUtil.wrapRequestHandler(handler);
    }
    return Weaver.callOriginal();
}

19 Source : RoutingContextImplBase_Instrumentation.java
with Apache License 2.0
from newrelic

protected void restart() {
    addHeadersEndHandler(VertxUtil.expireAndNameTxnHandler(this));
    Weaver.callOriginal();
}

19 Source : RoutingContextImplBase_Instrumentation.java
with Apache License 2.0
from newrelic

protected int currentRouteNextFailureHandlerIndex() {
    return Weaver.callOriginal();
}

19 Source : RoutingContextImplBase_Instrumentation.java
with Apache License 2.0
from newrelic

protected int currentRouteNextHandlerIndex() {
    return Weaver.callOriginal();
}

19 Source : Http1xServerConnection_Instrumentation.java
with Apache License 2.0
from newrelic

private static Handler<HttpServerRequest> requestHandler(HttpHandlers handler) {
    Handler<HttpServerRequest> original = Weaver.callOriginal();
    if (original != null) {
        // Wrap the request handler so we can start the transaction and start tracking child threads
        return VertxUtil.wrapRequestHandler(original);
    }
    return original;
}

19 Source : Http1xServerConnection_Instrumentation.java
with Apache License 2.0
from newrelic

synchronized void requestHandlers(HttpHandlers handlers) {
    Weaver.callOriginal();
    // Wrap the request handler so we can start the transaction and start tracking child threads
    requestHandler = VertxUtil.wrapRequestHandler(requestHandler);
}

19 Source : Http1xServerConnection_Instrumentation.java
with Apache License 2.0
from newrelic

synchronized void requestHandler(Handler<HttpServerRequest> handler) {
    Weaver.callOriginal();
    // Wrap the request handler so we can start the transaction and start tracking child threads
    requestHandler = VertxUtil.wrapRequestHandler(requestHandler);
}

19 Source : RouteImpl_Instrumentation.java
with Apache License 2.0
from newrelic

protected synchronized boolean hasNextFailureHandler() {
    return Weaver.callOriginal();
}

19 Source : RouteImpl_Instrumentation.java
with Apache License 2.0
from newrelic

protected synchronized boolean hasNextContextHandler() {
    return Weaver.callOriginal();
}

19 Source : ServerConnection_Instrumentation.java
with Apache License 2.0
from newrelic

@Trace(dispatcher = true)
private void handleRequest(HttpServerRequestImpl req, HttpServerResponseImpl resp) {
    Weaver.callOriginal();
}

19 Source : HttpClientRequestImpl_Instrumentation.java
with Apache License 2.0
from newrelic

public void end(Handler<AsyncResult<Void>> handler) {
    if (AgentBridge.getAgent().getTransaction(false) != null) {
        segment = NewRelic.getAgent().getTransaction().startSegment(VERTX_CLIENT, END);
        segment.addOutboundRequestHeaders(new OutboundWrapper(headers()));
    }
    Weaver.callOriginal();
}

19 Source : HttpClientRequestImpl_Instrumentation.java
with Apache License 2.0
from newrelic

public void end(Buffer chunk) {
    if (AgentBridge.getAgent().getTransaction(false) != null) {
        segment = NewRelic.getAgent().getTransaction().startSegment(VERTX_CLIENT, END);
        segment.addOutboundRequestHeaders(new OutboundWrapper(headers()));
    }
    Weaver.callOriginal();
}

19 Source : HttpClientRequestImpl_Instrumentation.java
with Apache License 2.0
from newrelic

public void end() {
    if (AgentBridge.getAgent().getTransaction(false) != null) {
        segment = NewRelic.getAgent().getTransaction().startSegment(VERTX_CLIENT, END);
        segment.addOutboundRequestHeaders(new OutboundWrapper(headers()));
    }
    Weaver.callOriginal();
}

19 Source : HttpClientRequestImpl_Instrumentation.java
with Apache License 2.0
from newrelic

public void end(Buffer chunk, Handler<AsyncResult<Void>> handler) {
    if (AgentBridge.getAgent().getTransaction(false) != null) {
        segment = NewRelic.getAgent().getTransaction().startSegment(VERTX_CLIENT, END);
        segment.addOutboundRequestHeaders(new OutboundWrapper(headers()));
    }
    Weaver.callOriginal();
}

19 Source : FutureImpl_Instrumentation.java
with Apache License 2.0
from newrelic

public Future setHandler(Handler<AsyncResult> handler) {
    if (!isComplete()) {
        VertxCoreUtil.storeToken(handler);
    }
    return Weaver.callOriginal();
}

19 Source : HttpClientRequestImpl_Instrumentation.java
with Apache License 2.0
from newrelic

@Trace(async = true)
protected void doHandleResponse(HttpClientResponseImpl resp) {
    if (segment != null) {
        VertxCoreUtil.processResponse(segment, resp, resp.request().host, port, ssl ? "https" : "http");
        final Token token = segment.getTransaction().getToken();
        segment.end();
        token.linkAndExpire();
    }
    Weaver.callOriginal();
}

19 Source : Request_Weaved.java
with Apache License 2.0
from newrelic

public AsyncContextImpl_Weaved getAsyncContextInternal() {
    return Weaver.callOriginal();
}

19 Source : CoyoteAdapter_Weaved.java
with Apache License 2.0
from newrelic

/**
 * This method is called on the initial request.
 */
public void service(org.apache.coyote.Request req, org.apache.coyote.Response res) {
    Weaver.callOriginal();
    checkSuspend(req);
}

19 Source : Request.java
with Apache License 2.0
from newrelic

public AsyncContextImpl getAsyncContextInternal() {
    return Weaver.callOriginal();
}

19 Source : MemcachedNode_Instrumentation.java
with Apache License 2.0
from newrelic

public void insertOp(Operation o) {
    MemcachedUtil.OPERATION_NODE.set(o.getHandlingNode());
    Weaver.callOriginal();
}

19 Source : MemcachedNode_Instrumentation.java
with Apache License 2.0
from newrelic

public void addOp(Operation op) {
    MemcachedUtil.OPERATION_NODE.set(op.getHandlingNode());
    Weaver.callOriginal();
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

// Don't instrument the replace() methods. JAVA-2642.
public <T> GetFuture<T> asyncGet(final String key, final Transcoder<T> tc) {
    beforeOperation();
    GetFuture<T> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("get", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

// This instruments both add() overloads, both replace() overloads, and both set() overloads (6 API methods total)
private <T> OperationFuture<Boolean> asyncStore(StoreType st, String key, int exp, T value, Transcoder<T> tc) {
    beforeOperation();
    OperationFuture<Boolean> future = Weaver.callOriginal();
    // JAVA-2642
    reportDatastoreMetricsAsync(st.toString(), future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public <T> OperationFuture<CASResponse> asyncCAS(String key, long casId, int exp, T value, Transcoder<T> tc) {
    beforeOperation();
    OperationFuture<CASResponse> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("compare-and-set", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public OperationFuture<Long> asyncDecr(String key, long by, long def, int exp) {
    beforeOperation();
    OperationFuture<Long> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("decr", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public OperationFuture<Boolean> delete(String key, long cas) {
    beforeOperation();
    OperationFuture<Boolean> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("delete", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public OperationFuture<Long> asyncIncr(String key, int by, long def) {
    beforeOperation();
    OperationFuture<Long> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("incr", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public OperationFuture<Long> asyncIncr(String key, int by, long def, int exp) {
    beforeOperation();
    OperationFuture<Long> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("incr", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public OperationFuture<Long> asyncDecr(String key, long by) {
    beforeOperation();
    OperationFuture<Long> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("decr", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public <T> OperationFuture<CASValue<T>> asyncGets(final String key, final Transcoder<T> tc) {
    beforeOperation();
    OperationFuture<CASValue<T>> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("get-for-cas", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public <T> OperationFuture<Boolean> prepend(long cas, String key, T val, Transcoder<T> tc) {
    beforeOperation();
    OperationFuture<Boolean> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("prepend", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public OperationFuture<Long> asyncDecr(String key, long by, long def) {
    beforeOperation();
    OperationFuture<Long> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("decr", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public <T> BulkFuture<Map<String, T>> asyncGetBulk(Iterator<String> keyIter, Iterator<Transcoder<T>> tcIter) {
    beforeOperation();
    BulkFuture<Map<String, T>> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("get-bulk", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public <T> OperationFuture<Boolean> touch(final String key, final int exp) {
    beforeOperation();
    OperationFuture<Boolean> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("touch", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public OperationFuture<Long> asyncDecr(String key, int by, long def) {
    beforeOperation();
    OperationFuture<Long> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("decr", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public <T> OperationFuture<Boolean> append(String key, T val, Transcoder<T> tc) {
    beforeOperation();
    OperationFuture<Boolean> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("append", future);
    return future;
}

19 Source : MemcachedClient_Instrumentation.java
with Apache License 2.0
from newrelic

public OperationFuture<Long> asyncDecr(String key, int by, long def, int exp) {
    beforeOperation();
    OperationFuture<Long> future = Weaver.callOriginal();
    reportDatastoreMetricsAsync("decr", future);
    return future;
}

See More Examples