Search in sources :

Example 6 with AgentBuilder

use of net.bytebuddy.agent.builder.AgentBuilder in project Aeron by real-logic.

the class AgentBuilderListener method addArchiveInstrumentation.

private static AgentBuilder addArchiveInstrumentation(final AgentBuilder agentBuilder) {
    AgentBuilder tempBuilder = agentBuilder;
    tempBuilder = addArchiveControlSessionDemuxerInstrumentation(tempBuilder);
    tempBuilder = addEventInstrumentation(tempBuilder, ARCHIVE_EVENT_CODES, ArchiveEventCode.CMD_OUT_RESPONSE, "ControlResponseProxy", ControlInterceptor.ControlResponse.class, "sendResponseHook");
    tempBuilder = addEventInstrumentation(tempBuilder, ARCHIVE_EVENT_CODES, ArchiveEventCode.REPLICATION_SESSION_STATE_CHANGE, "ReplicationSession", ArchiveInterceptor.ReplicationSessionStateChange.class, "stateChange");
    tempBuilder = addEventInstrumentation(tempBuilder, ARCHIVE_EVENT_CODES, ArchiveEventCode.CONTROL_SESSION_STATE_CHANGE, "ControlSession", ArchiveInterceptor.ControlSessionStateChange.class, "stateChange");
    tempBuilder = addEventInstrumentation(tempBuilder, ARCHIVE_EVENT_CODES, ArchiveEventCode.REPLAY_SESSION_ERROR, "ReplaySession", ArchiveInterceptor.ReplaySession.class, "onPendingError");
    tempBuilder = addEventInstrumentation(tempBuilder, ARCHIVE_EVENT_CODES, ArchiveEventCode.CATALOG_RESIZE, "Catalog", ArchiveInterceptor.Catalog.class, "catalogResized");
    return tempBuilder;
}
Also used : AgentBuilder(net.bytebuddy.agent.builder.AgentBuilder)

Example 7 with AgentBuilder

use of net.bytebuddy.agent.builder.AgentBuilder in project Aeron by real-logic.

the class AgentBuilderListener method addDriverFlowControlInstrumentation.

private static AgentBuilder addDriverFlowControlInstrumentation(final AgentBuilder agentBuilder) {
    AgentBuilder tempBuilder = agentBuilder;
    tempBuilder = addEventInstrumentation(tempBuilder, DRIVER_EVENT_CODES, DriverEventCode.FLOW_CONTROL_RECEIVER_ADDED, "AbstractMinMulticastFlowControl", DriverInterceptor.FlowControl.ReceiverAdded.class, "receiverAdded");
    tempBuilder = addEventInstrumentation(tempBuilder, DRIVER_EVENT_CODES, DriverEventCode.FLOW_CONTROL_RECEIVER_REMOVED, "AbstractMinMulticastFlowControl", DriverInterceptor.FlowControl.ReceiverRemoved.class, "receiverRemoved");
    return tempBuilder;
}
Also used : AgentBuilder(net.bytebuddy.agent.builder.AgentBuilder)

Example 8 with AgentBuilder

use of net.bytebuddy.agent.builder.AgentBuilder in project Aeron by real-logic.

the class AgentBuilderListener method addDriverReceiverProxyInstrumentation.

private static AgentBuilder addDriverReceiverProxyInstrumentation(final AgentBuilder agentBuilder) {
    AgentBuilder tempBuilder = agentBuilder;
    tempBuilder = addEventInstrumentation(tempBuilder, DRIVER_EVENT_CODES, DriverEventCode.RECEIVE_CHANNEL_CREATION, "ReceiverProxy", ChannelEndpointInterceptor.ReceiverProxy.RegisterReceiveChannelEndpoint.class, "registerReceiveChannelEndpoint");
    tempBuilder = addEventInstrumentation(tempBuilder, DRIVER_EVENT_CODES, DriverEventCode.RECEIVE_CHANNEL_CLOSE, "ReceiverProxy", ChannelEndpointInterceptor.ReceiverProxy.CloseReceiveChannelEndpoint.class, "closeReceiveChannelEndpoint");
    return tempBuilder;
}
Also used : AgentBuilder(net.bytebuddy.agent.builder.AgentBuilder)

Example 9 with AgentBuilder

use of net.bytebuddy.agent.builder.AgentBuilder in project Aeron by real-logic.

the class AgentBuilderListener method addDriverInstrumentation.

private static AgentBuilder addDriverInstrumentation(final AgentBuilder agentBuilder) {
    AgentBuilder tempBuilder = agentBuilder;
    tempBuilder = addDriverConductorInstrumentation(tempBuilder);
    tempBuilder = addDriverCommandInstrumentation(tempBuilder);
    tempBuilder = addDriverSenderProxyInstrumentation(tempBuilder);
    tempBuilder = addDriverReceiverProxyInstrumentation(tempBuilder);
    tempBuilder = addDriverUdpChannelTransportInstrumentation(tempBuilder);
    tempBuilder = addEventInstrumentation(tempBuilder, DRIVER_EVENT_CODES, DriverEventCode.UNTETHERED_SUBSCRIPTION_STATE_CHANGE, "UntetheredSubscription", DriverInterceptor.UntetheredSubscriptionStateChange.class, "stateChange");
    tempBuilder = addDriverNameResolutionInstrumentation(tempBuilder);
    tempBuilder = addDriverFlowControlInstrumentation(tempBuilder);
    return tempBuilder;
}
Also used : AgentBuilder(net.bytebuddy.agent.builder.AgentBuilder)

Example 10 with AgentBuilder

use of net.bytebuddy.agent.builder.AgentBuilder in project Aeron by real-logic.

the class AgentBuilderListener method addDriverNameResolutionInstrumentation.

private static AgentBuilder addDriverNameResolutionInstrumentation(final AgentBuilder agentBuilder) {
    AgentBuilder tempBuilder = agentBuilder;
    tempBuilder = addEventInstrumentation(tempBuilder, DRIVER_EVENT_CODES, DriverEventCode.NAME_RESOLUTION_NEIGHBOR_ADDED, "Neighbor", DriverInterceptor.NameResolution.NeighborAdded.class, "neighborAdded");
    tempBuilder = addEventInstrumentation(tempBuilder, DRIVER_EVENT_CODES, DriverEventCode.NAME_RESOLUTION_NEIGHBOR_REMOVED, "Neighbor", DriverInterceptor.NameResolution.NeighborRemoved.class, "neighborRemoved");
    tempBuilder = addEventInstrumentation(tempBuilder, DRIVER_EVENT_CODES, DriverEventCode.NAME_RESOLUTION_RESOLVE, "DefaultNameResolver", DriverInterceptor.NameResolution.Resolve.class, "resolveHook");
    return tempBuilder;
}
Also used : AgentBuilder(net.bytebuddy.agent.builder.AgentBuilder)

Aggregations

AgentBuilder (net.bytebuddy.agent.builder.AgentBuilder)17 Settings (io.opencensus.contrib.agent.Settings)6 Test (org.junit.Test)6 Instrumenter (io.opencensus.contrib.agent.instrumentation.Instrumenter)1 JarFile (java.util.jar.JarFile)1 ByteBuddy (net.bytebuddy.ByteBuddy)1 AgentRunner (org.agrona.concurrent.AgentRunner)1 SleepingMillisIdleStrategy (org.agrona.concurrent.SleepingMillisIdleStrategy)1