Commit e881421d authored by chenpengfei's avatar chenpengfei Committed by 吴晟
Browse files

Add Undertow 2.x plugin (#1697)

* Add Undertow 2.x plugin

* Undertow: Interceptor method executeRootHandler in class Connectors
parent 690b2ad9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -171,6 +171,9 @@ Elasticsearch:
transport-client:
  id: 48
  languages: Java
Undertow:
  id: 49
  languages: Java

# .NET/.NET Core components
# [3000, 4000) for C#/.NET only
+4 −1
Original line number Diff line number Diff line
@@ -98,6 +98,8 @@ public class ComponentsDefine {

    public static final OfficialComponent TRANSPORT_CLIENT =  new OfficialComponent(48, "transport-client");

    public static final OfficialComponent UNDERTOW =  new OfficialComponent(49, "Undertow");

    private static ComponentsDefine INSTANCE = new ComponentsDefine();

    private String[] components;
@@ -107,7 +109,7 @@ public class ComponentsDefine {
    }

    public ComponentsDefine() {
        components = new String[49];
        components = new String[50];
        addComponent(TOMCAT);
        addComponent(HTTPCLIENT);
        addComponent(DUBBO);
@@ -144,6 +146,7 @@ public class ComponentsDefine {
        addComponent(ACTIVEMQ_PRODUCER);
        addComponent(ACTIVEMQ_CONSUMER);
        addComponent(TRANSPORT_CLIENT);
        addComponent(UNDERTOW);
    }

    private void addComponent(OfficialComponent component) {
+1 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@
        <module>sofarpc-plugin</module>
        <module>elasticsearch-5.x-plugin</module>
        <module>activemq-5.x-plugin</module>
        <module>undertow-plugins</module>
    </modules>
    <packaging>pom</packaging>

+44 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You 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.
  ~
  -->

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.skywalking</groupId>
        <artifactId>apm-sdk-plugin</artifactId>
        <version>5.0.0-GA-SNAPSHOT</version>
    </parent>

    <artifactId>undertow-plugins</artifactId>
    <modules>
        <module>undertow-2.x-plugin</module>
    </modules>
    <packaging>pom</packaging>

    <name>undertow-plugins</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <sdk.plugin.related.dir>/..</sdk.plugin.related.dir>
    </properties>
</project>
+54 −0
Original line number Diff line number Diff line
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You 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.
  ~
  -->

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>undertow-plugins</artifactId>
        <groupId>org.apache.skywalking</groupId>
        <version>5.0.0-GA-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>apm-undertow-2.x-plugin</artifactId>
    <packaging>jar</packaging>

    <name>undertow-2.x-plugin</name>
    <url>http://maven.apache.org</url>

    <properties>
        <undertow.version>2.0.9.Final</undertow.version>
        <servlet-api.version>3.1.0</servlet-api.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.undertow</groupId>
            <artifactId>undertow-core</artifactId>
            <version>${undertow.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>${servlet-api.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
Loading