Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
METRICS-3127: As a user I would like to see the trigger of a trace (H…
…TTP request, message bus, scheduler) as a property
  • Loading branch information
Shachar Anchelovich committed Dec 30, 2012
1 parent ea88a7d commit 40f9ddb
Show file tree
Hide file tree
Showing 13 changed files with 263 additions and 0 deletions.
@@ -0,0 +1,33 @@
/**
* Copyright (c) 2009-2011 VMware, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.springsource.insight.plugin.jms;

import com.springsource.insight.intercept.trace.AbstractTraceSourceAnalyzer;
import com.springsource.insight.intercept.trace.TraceSource;

public class JmsTraceSourceAnalyzer extends AbstractTraceSourceAnalyzer {
private static final JmsTraceSourceAnalyzer INSTANCE = new JmsTraceSourceAnalyzer();

private JmsTraceSourceAnalyzer() {
super(TraceSource.MESSAGE_BUS, JMSPluginOperationType.LISTENER_RECEIVE.getOperationType(),
JMSPluginOperationType.RECEIVE.getOperationType(),
JMSPluginOperationType.SEND.getOperationType());
}

public static final JmsTraceSourceAnalyzer getInstance() {
return INSTANCE;
}
}
Expand Up @@ -50,6 +50,11 @@
factory-method="getInstance"
lazy-init="true"
/>
<bean id="JmsTraceSourceAnalyzer"
class="com.springsource.insight.plugin.jms.JmsTraceSourceAnalyzer"
factory-method="getInstance"
lazy-init="true"
/>

</beans>

@@ -0,0 +1,28 @@
/**
* Copyright (c) 2009-2011 VMware, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.springsource.insight.plugin.jms;

import com.springsource.insight.intercept.test.AbstractTraceSourceAnalyzerTestSupport;
import com.springsource.insight.intercept.trace.TraceSource;

public class JmsTraceSourceAnalyzerTest extends AbstractTraceSourceAnalyzerTestSupport {

public JmsTraceSourceAnalyzerTest() {
super(JmsTraceSourceAnalyzer.getInstance(), TraceSource.MESSAGE_BUS, JMSPluginOperationType.LISTENER_RECEIVE.getOperationType(),
JMSPluginOperationType.RECEIVE.getOperationType(),
JMSPluginOperationType.SEND.getOperationType());
}
}
@@ -0,0 +1,31 @@
/**
* Copyright (c) 2009-2011 VMware, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.springsource.insight.plugin.quartz.scheduler;

import com.springsource.insight.intercept.trace.AbstractTraceSourceAnalyzer;
import com.springsource.insight.intercept.trace.TraceSource;

public class QuartzTraceSourceAnalyzer extends AbstractTraceSourceAnalyzer {
private static final QuartzTraceSourceAnalyzer INSTANCE = new QuartzTraceSourceAnalyzer();

private QuartzTraceSourceAnalyzer() {
super(TraceSource.SCHEDULER, QuartzSchedulerDefinitions.TYPE);
}

public static final QuartzTraceSourceAnalyzer getInstance() {
return INSTANCE;
}
}
Expand Up @@ -18,5 +18,10 @@
factory-method="getInstance"
lazy-init="true"
/>
<bean id="quartzTraceSourceAnalyzer"
class="com.springsource.insight.plugin.quartz.scheduler.QuartzTraceSourceAnalyzer"
factory-method="getInstance"
lazy-init="true"
/>

</beans>
@@ -0,0 +1,27 @@
/**
* Copyright (c) 2009-2011 VMware, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.springsource.insight.plugin.quartz.scheduler;

import com.springsource.insight.intercept.test.AbstractTraceSourceAnalyzerTestSupport;
import com.springsource.insight.intercept.trace.TraceSource;

public class QuartzTraceSourceAnalyzerTest extends AbstractTraceSourceAnalyzerTestSupport {

public QuartzTraceSourceAnalyzerTest() {
super(QuartzTraceSourceAnalyzer.getInstance(), TraceSource.SCHEDULER, QuartzSchedulerDefinitions.TYPE);
}

}
@@ -0,0 +1,32 @@
/**
* Copyright (c) 2009-2011 VMware, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.springsource.insight.plugin.rabbitmqClient;

import com.springsource.insight.intercept.trace.AbstractTraceSourceAnalyzer;
import com.springsource.insight.intercept.trace.TraceSource;

public class RabbitTraceSourceAnalyzer extends AbstractTraceSourceAnalyzer {
private static final RabbitTraceSourceAnalyzer INSTANCE = new RabbitTraceSourceAnalyzer();

private RabbitTraceSourceAnalyzer() {
super(TraceSource.MESSAGE_BUS, RabbitPluginOperationType.CONSUME.getOperationType(),
RabbitPluginOperationType.PUBLISH.getOperationType());
}

public static final RabbitTraceSourceAnalyzer getInstance() {
return INSTANCE;
}
}
Expand Up @@ -39,5 +39,11 @@
factory-method="getInstance"
lazy-init="true"
/>

<bean id="rabbitTraceSourceAnalyzer"
class="com.springsource.insight.plugin.rabbitmqClient.RabbitTraceSourceAnalyzer"
factory-method="getInstance"
lazy-init="true"
/>
</beans>

@@ -0,0 +1,29 @@
/**
* Copyright (c) 2009-2011 VMware, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.springsource.insight.plugin.rabbitmqClient;

import com.springsource.insight.intercept.test.AbstractTraceSourceAnalyzerTestSupport;
import com.springsource.insight.intercept.trace.TraceSource;

public class RabbitTraceSourceAnalyzerTest extends AbstractTraceSourceAnalyzerTestSupport {

public RabbitTraceSourceAnalyzerTest() {
super(RabbitTraceSourceAnalyzer.getInstance(), TraceSource.MESSAGE_BUS, RabbitPluginOperationType.CONSUME.getOperationType(),
RabbitPluginOperationType.PUBLISH.getOperationType());
}


}
@@ -0,0 +1,32 @@
/**
* Copyright (c) 2009-2011 VMware, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.springsource.insight.plugin.servlet;

import com.springsource.insight.intercept.operation.OperationType;
import com.springsource.insight.intercept.trace.AbstractTraceSourceAnalyzer;
import com.springsource.insight.intercept.trace.TraceSource;

public class HttpTraceSourceAnalyzer extends AbstractTraceSourceAnalyzer {
private static final HttpTraceSourceAnalyzer INSTANCE = new HttpTraceSourceAnalyzer();

private HttpTraceSourceAnalyzer() {
super(TraceSource.HTTP, OperationType.HTTP);
}

public static final HttpTraceSourceAnalyzer getInstance() {
return INSTANCE;
}
}
Expand Up @@ -49,4 +49,10 @@
lazy-init="true"
/>

<bean id="httpTraceSourceAnalyzer"
class="com.springsource.insight.plugin.servlet.HttpTraceSourceAnalyzer"
factory-method="getInstance"
lazy-init="true"
/>

</beans>
Expand Up @@ -34,6 +34,7 @@ public class ExposedServletPluginSpringBeanTest
@Autowired(required=false) protected ServletEndPointAnalyzer servletEndPointAnalyzer;
@Autowired(required=false) protected RequestResponseSizeMetricsGenerator requestResponseSizeMetricsGenerator;
@Autowired(required=false) protected HttpStatusTraceErrorAnalyzer httpStatusTraceErrorAnalyzer;
@Autowired(required=false) protected HttpTraceSourceAnalyzer httpTraceSourceAnalyzer;


public ExposedServletPluginSpringBeanTest() {
Expand Down
@@ -0,0 +1,28 @@
/**
* Copyright (c) 2009-2011 VMware, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.springsource.insight.plugin.servlet;

import com.springsource.insight.intercept.operation.OperationType;
import com.springsource.insight.intercept.test.AbstractTraceSourceAnalyzerTestSupport;
import com.springsource.insight.intercept.trace.TraceSource;

public class HttpTraceSourceAnalyzerTest extends AbstractTraceSourceAnalyzerTestSupport {

public HttpTraceSourceAnalyzerTest() {
super(HttpTraceSourceAnalyzer.getInstance(), TraceSource.HTTP, OperationType.HTTP);
}

}

0 comments on commit 40f9ddb

Please sign in to comment.