Initializes a DatabaseInfo instance that is required for tracing database requests.
+
+
+
Parameters:
name - name of the database
vendor - database vendor name (e.g. Oracle, MySQL, ...), can be a user defined name
+ If possible use a constant defined in DatabaseVendor
channelType - communication protocol used to communicate with the database.
channelEndpoint - this represents the communication endpoint for the database. This information allows Dynatrace to tie the database requests to a specific process or cloud service. It is optional.
+ * for TCP/IP: host name/IP of the server-side (can include port in the form of "host:port")
+ * for UNIX domain sockets: name of domain socket file
+ * for named pipes: name of pipe
+
Returns an array containing the constants of this enum type, in
+the order they are declared. This method may be used to iterate
+over the constants as follows:
+
+for (DatabaseVendor c : DatabaseVendor.values())
+ System.out.println(c);
+
+
+
+
+
Returns:
an array containing the constants of this enum type, in
+the order they are declared
Returns the enum constant of this type with the specified name.
+The string must match exactly an identifier used to declare an
+enum constant in this type. (Extraneous whitespace characters are
+not permitted.)
+
+
+
Parameters:
name - the name of the enum constant to be returned.
+
Returns:
the enum constant with the specified name
+
Throws:
+
java.lang.IllegalArgumentException - if this enum type has no constant
+with the specified name
+
java.lang.NullPointerException - if the argument is null
Using this headername to transport Dynatrace tag inside an outgoing http
request ensures compatibility to Dynatrace built-in sensors.
@@ -178,6 +181,9 @@
Returns the enum constant of this type with the specified name.
@@ -303,6 +324,10 @@
Static method in enum com.dynatrace.oneagent.sdk.api.enums.ChannelType
Returns an array containing the constants of this enum type, in
the order they are declared.
+
Returns an array containing the constants of this enum type, in
diff --git a/docs/index.html b/docs/index.html
index 883fa39..ec50c3d 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -2,16 +2,50 @@
-
+
-sdk 1.5.0 API
+sdk 1.7.0 API
@@ -80,7 +80,7 @@
diff --git a/samples/README.md b/samples/README.md
index 1f8bfe1..c6e99f4 100644
--- a/samples/README.md
+++ b/samples/README.md
@@ -6,8 +6,9 @@ Sample applications showing how to use Dynatrace OneAgent SDK for Java to create
- `remotecall`: shows usage of remote call API. Allows you to tag remote calls in the same or between different JVMs.
- `in-process-linking`: shows usage of in-process-linking API. Allows you to tag eg. asynchronous execution inside the same process.
-- `webrequest`: shows usage of outging- and incoming webrequests.
+- `webrequest`: shows usage of outgoing and incoming web request tracing
- `messaging`: shows usage of messaging
+- `database`: shows usage of database request tracing
## Build and prepare running sample applications
@@ -45,3 +46,9 @@ This Application shows how to trace outgoing, receiving and processing of incomi
- run sample: `mvn exec:exec`
+### Run DatabaseRequest sample application
+This Application shows how to trace database requests. To run this sample you just go into the sample directory and run the sample by typing:
+
+- run sample: `mvn exec:exec`
+
+To run this sample you need to create a custom service for your tenant. See source of sample app for details.
diff --git a/samples/database/pom.xml b/samples/database/pom.xml
new file mode 100644
index 0000000..d77592c
--- /dev/null
+++ b/samples/database/pom.xml
@@ -0,0 +1,84 @@
+
+ 4.0.0
+
+ com.dynatrace.oneagent.sdk.samples.messaging
+ messaging-sample
+ 1.7.0
+ jar
+
+
+
+ com.dynatrace.oneagent.sdk.java
+ oneagent-sdk
+ 1.7.0
+ compile
+
+
+
+ https://github.com/Dynatrace/OneAgent-SDK-Java
+ Dynatrace OneAgent SDK Java database request sample
+
+ Dynatrace
+ http://www.dynatrace.com
+
+
+
+ 1.6
+ 1.6
+ UTF-8
+ UTF-8
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 2.4
+
+
+
+ true
+ com.dynatrace.oneagent.sdk.samples.database.DatabaseApp
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.6.0
+
+
+
+ exec
+
+
+
+
+ java
+
+ ${agent.agentpath}
+ -classpath
+
+ com.dynatrace.oneagent.sdk.samples.database.DatabaseApp
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/database/src/main/java/com/dynatrace/oneagent/sdk/samples/database/DatabaseApp.java b/samples/database/src/main/java/com/dynatrace/oneagent/sdk/samples/database/DatabaseApp.java
new file mode 100644
index 0000000..5056081
--- /dev/null
+++ b/samples/database/src/main/java/com/dynatrace/oneagent/sdk/samples/database/DatabaseApp.java
@@ -0,0 +1,85 @@
+package com.dynatrace.oneagent.sdk.samples.database;
+
+import com.dynatrace.oneagent.sdk.OneAgentSDKFactory;
+import com.dynatrace.oneagent.sdk.api.DatabaseRequestTracer;
+import com.dynatrace.oneagent.sdk.api.OneAgentSDK;
+import com.dynatrace.oneagent.sdk.api.enums.ChannelType;
+import com.dynatrace.oneagent.sdk.api.infos.DatabaseInfo;
+
+/**
+ * Sample application shows how database requests should be traced.
+ *
+ * @author Alram.Lechner
+ *
+ */
+public class DatabaseApp {
+
+ private final OneAgentSDK oneAgentSdk;
+
+ static DatabaseApp instance;
+
+ private DatabaseApp() {
+ oneAgentSdk = OneAgentSDKFactory.createInstance();
+ oneAgentSdk.setLoggingCallback(new StdErrLoggingCallback());
+ switch (oneAgentSdk.getCurrentState()) {
+ case ACTIVE:
+ System.out.println("SDK is active and capturing.");
+ break;
+ case PERMANENTLY_INACTIVE:
+ System.err.println(
+ "SDK is PERMANENTLY_INACTIVE; Probably no OneAgent injected or OneAgent is incompatible with SDK.");
+ break;
+ case TEMPORARILY_INACTIVE:
+ System.err.println(
+ "SDK is TEMPORARILY_INACTIVE; OneAgent has been deactivated - check OneAgent configuration.");
+ break;
+ default:
+ System.err.println("SDK is in unknown state.");
+ break;
+ }
+ instance = this;
+ }
+
+ public static void main(String args[]) {
+ System.out.println("*************************************************************");
+ System.out.println("** Running database request sample **");
+ System.out.println("*************************************************************");
+ try {
+ DatabaseApp app = new DatabaseApp();
+
+ app.traceSqlRequest("Select * from anyTable");
+
+ System.out.println("sample application stopped. sleeping a while, so OneAgent is able to send data to server ...");
+ Thread.sleep(15000 * 3); // we have to wait - so OneAgent is able to send data to server
+ } catch (Exception e) {
+ System.err.println("database request sample failed: " + e.getMessage());
+ e.printStackTrace();
+ System.exit(-1);
+ }
+ }
+
+ /**
+ * You need to add a custom service for this method. a database request will only be captured, if it s part of an already
+ * started transaction.
+ * see Dynatrace help
+ * for more information about a custom service.
+ */
+ private void traceSqlRequest(String sql) {
+ DatabaseInfo databaseInfo = oneAgentSdk.createDatabaseInfo("myCoolDatabase", "UnsupportedDatabaseVendor", ChannelType.TCP_IP, "theDbHost.localdomain:3434");
+ DatabaseRequestTracer databaseRequestTracer = oneAgentSdk.traceSqlDatabaseRequest(databaseInfo, sql);
+ databaseRequestTracer.start();
+ try {
+ executeRequest(sql);
+ } catch(Exception e) {
+ databaseRequestTracer.error(e);
+ // handle or re-throw exception!
+ } finally {
+ databaseRequestTracer.end();
+ }
+ }
+
+ private void executeRequest(String sql) {
+ // run the sql against the db ...
+ }
+
+}
diff --git a/samples/database/src/main/java/com/dynatrace/oneagent/sdk/samples/database/StdErrLoggingCallback.java b/samples/database/src/main/java/com/dynatrace/oneagent/sdk/samples/database/StdErrLoggingCallback.java
new file mode 100644
index 0000000..c6d131d
--- /dev/null
+++ b/samples/database/src/main/java/com/dynatrace/oneagent/sdk/samples/database/StdErrLoggingCallback.java
@@ -0,0 +1,37 @@
+package com.dynatrace.oneagent.sdk.samples.database;
+
+/*
+ * Copyright 2018 Dynatrace LLC
+ *
+ * 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.
+ */
+
+import com.dynatrace.oneagent.sdk.api.LoggingCallback;
+
+/**
+ * Implementation of OneAgent Logging Callback. Just printing output messages to
+ * std err.
+ */
+public class StdErrLoggingCallback implements LoggingCallback {
+
+ @Override
+ public void error(String message) {
+ System.err.println("[OneAgent SDK ERROR]: " + message);
+ }
+
+ @Override
+ public void warn(String message) {
+ System.err.println("[OneAgent SDK WARNING]: " + message);
+ }
+
+}
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/OneAgentSDKFactory.java b/src/main/java/com/dynatrace/oneagent/sdk/OneAgentSDKFactory.java
index 2f16894..f1bb884 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/OneAgentSDKFactory.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/OneAgentSDKFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/DatabaseRequestTracer.java b/src/main/java/com/dynatrace/oneagent/sdk/api/DatabaseRequestTracer.java
new file mode 100644
index 0000000..3e2e94d
--- /dev/null
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/DatabaseRequestTracer.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2019 Dynatrace LLC
+ *
+ * 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.dynatrace.oneagent.sdk.api;
+
+/**
+ * Interface for outgoing database tracer.
+ * https://github.com/Dynatrace/OneAgent-SDK-for-Java#databaseRequest
+ *
+ * @since 1.7.0
+ */
+public interface DatabaseRequestTracer extends Tracer {
+
+ /**
+ * Adds optional information about retrieved rows of the traced database request.
+ *
+ * @param returnedRowCount number of rows returned by this traced database request. Only positive values are allowed.
+ * @since 1.7.0
+ */
+ public void setReturnedRowCount(int returnedRowCount);
+
+ /**
+ * Adds optional information about round-trip count to database server.
+ *
+ * @param roundTripCount count of round-trips that took place. Only positive values are allowed.
+ * @since 1.7.0
+ */
+ public void setRoundTripCount(int roundTripCount);
+
+}
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/InProcessLink.java b/src/main/java/com/dynatrace/oneagent/sdk/api/InProcessLink.java
index 2df3d65..3bf52d4 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/InProcessLink.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/InProcessLink.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/InProcessLinkTracer.java b/src/main/java/com/dynatrace/oneagent/sdk/api/InProcessLinkTracer.java
index 42a42c0..ed9b04e 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/InProcessLinkTracer.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/InProcessLinkTracer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingMessageProcessTracer.java b/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingMessageProcessTracer.java
index 9a71fe5..50d5751 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingMessageProcessTracer.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingMessageProcessTracer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingMessageReceiveTracer.java b/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingMessageReceiveTracer.java
index f89a255..ab144e0 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingMessageReceiveTracer.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingMessageReceiveTracer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingRemoteCallTracer.java b/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingRemoteCallTracer.java
index a6e185f..440b6cc 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingRemoteCallTracer.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingRemoteCallTracer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingTaggable.java b/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingTaggable.java
index 39dec5a..eae1673 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingTaggable.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingTaggable.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingWebRequestTracer.java b/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingWebRequestTracer.java
index 9a1e445..a2541ae 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingWebRequestTracer.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/IncomingWebRequestTracer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/LoggingCallback.java b/src/main/java/com/dynatrace/oneagent/sdk/api/LoggingCallback.java
index 4eb4071..1190a30 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/LoggingCallback.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/LoggingCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/OneAgentSDK.java b/src/main/java/com/dynatrace/oneagent/sdk/api/OneAgentSDK.java
index aa46dad..84306d2 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/OneAgentSDK.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/OneAgentSDK.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@
import com.dynatrace.oneagent.sdk.api.enums.ChannelType;
import com.dynatrace.oneagent.sdk.api.enums.MessageDestinationType;
import com.dynatrace.oneagent.sdk.api.enums.SDKState;
+import com.dynatrace.oneagent.sdk.api.infos.DatabaseInfo;
import com.dynatrace.oneagent.sdk.api.infos.MessagingSystemInfo;
import com.dynatrace.oneagent.sdk.api.infos.WebApplicationInfo;
@@ -44,6 +45,34 @@ public interface OneAgentSDK {
* Using this propertyname to transport Dynatrace tag along with the message, ensures compatibility to Dynatrace built-in sensors.
*/
public static final String DYNATRACE_MESSAGE_PROPERTYNAME = "dtdTraceTagInfo";
+
+ // ***** outgoing Database *****
+
+ /**
+ * Initializes a DatabaseInfo instance that is required for tracing database requests.
+ *
+ * @param name name of the database
+ * @param vendor database vendor name (e.g. Oracle, MySQL, ...), can be a user defined name
+ * If possible use a constant defined in {@link com.dynatrace.oneagent.sdk.api.enums.DatabaseVendor}
+ * @param channelType communication protocol used to communicate with the database.
+ * @param channelEndpoint this represents the communication endpoint for the database. This information allows Dynatrace to tie the database requests to a specific process or cloud service. It is optional.
+ * * for TCP/IP: host name/IP of the server-side (can include port in the form of "host:port")
+ * * for UNIX domain sockets: name of domain socket file
+ * * for named pipes: name of pipe
+ * @return {@link DatabaseInfo} instance to work with
+ * @since 1.7.0
+ */
+ DatabaseInfo createDatabaseInfo(String name, String vendor, ChannelType channelType, String channelEndpoint);
+
+ /**
+ * Creates a tracer for tracing outgoing SQL database requests.
+ *
+ * @param databaseInfo information about database
+ * @param statement database SQL statement
+ * @return {@link DatabaseRequestTracer} to work with
+ * @since 1.7.0
+ */
+ DatabaseRequestTracer traceSqlDatabaseRequest(DatabaseInfo databaseInfo, String statement);
// ***** Web Requests (incoming) *****
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingMessageTracer.java b/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingMessageTracer.java
index d1c0ee1..cfe5977 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingMessageTracer.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingMessageTracer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingRemoteCallTracer.java b/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingRemoteCallTracer.java
index 34f0d3f..8d26b4b 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingRemoteCallTracer.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingRemoteCallTracer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingTaggable.java b/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingTaggable.java
index 850e72b..22a8b8e 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingTaggable.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingTaggable.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingWebRequestTracer.java b/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingWebRequestTracer.java
index 6842592..dd45469 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingWebRequestTracer.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/OutgoingWebRequestTracer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/Tracer.java b/src/main/java/com/dynatrace/oneagent/sdk/api/Tracer.java
index 6b4e543..5bb8969 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/Tracer.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/Tracer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/enums/ChannelType.java b/src/main/java/com/dynatrace/oneagent/sdk/api/enums/ChannelType.java
index eba52b3..f15f0b1 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/enums/ChannelType.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/enums/ChannelType.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/enums/DatabaseVendor.java b/src/main/java/com/dynatrace/oneagent/sdk/api/enums/DatabaseVendor.java
new file mode 100644
index 0000000..ce6762d
--- /dev/null
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/enums/DatabaseVendor.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2019 Dynatrace LLC
+ *
+ * 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.dynatrace.oneagent.sdk.api.enums;
+
+import com.dynatrace.oneagent.sdk.api.OneAgentSDK;
+
+/**
+ * Enumerates all well-known database vendors. See {@link OneAgentSDK#createDatabaseInfo(String, String, ChannelType, String)}.
+ * Using these constants ensures that services captured by OneAgentSDK are handled the same way as traced via built-in sensors.
+ * @since 1.7.0
+ */
+public enum DatabaseVendor {
+
+ APACHE_HIVE("ApacheHive"),
+ CLOUDSCAPE("Cloudscape"),
+ HSQLDB("HSQLDB"),
+ PROGRESS("Progress"),
+ MAXDB("MaxDB"),
+ HANADB("HanaDB"),
+ INGRES("Ingres"),
+ FIRST_SQL("FirstSQL"),
+ ENTERPRISE_DB("EnterpriseDB"),
+ CACHE("Cache"),
+ ADABAS("Adabas"),
+ FIREBIRD("Firebird"),
+ DB2("DB2"),
+ DERBY_CLIENT("Derby Client"),
+ DERBY_EMBEDDED("Derby Embedded"),
+ FILEMAKER("Filemaker"),
+ INFORMIX("Informix"),
+ INSTANT_DB("InstantDb"),
+ INTERBASE("Interbase"),
+ MYSQL("MySQL"),
+ MARIADB("MariaDB"),
+ NETEZZA("Netezza"),
+ ORACLE("Oracle"),
+ PERVASIVE("Pervasive"),
+ POINTBASE("Pointbase"),
+ POSTGRESQL("PostgreSQL"),
+ SQLSERVER("SQL Server"),
+ SQLITE("sqlite"),
+ SYBASE("Sybase"),
+ TERADATA("Teradata"),
+ VERTICA("Vertica"),
+ CASSANDRA("Cassandra"),
+ H2("H2"),
+ COLDFUSION_IMQ("ColdFusion IMQ"),
+ REDSHIFT("Amazon Redshift"),
+ COUCHBASE("Couchbase");
+
+ private final String vendorName;
+
+ private DatabaseVendor(String vendorName) {
+ this.vendorName = vendorName;
+ }
+
+ public String getVendorName() {
+ return vendorName;
+ }
+
+ @Override
+ public String toString() {
+ return vendorName;
+ }
+}
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/enums/MessageDestinationType.java b/src/main/java/com/dynatrace/oneagent/sdk/api/enums/MessageDestinationType.java
index d11859b..f890189 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/enums/MessageDestinationType.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/enums/MessageDestinationType.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/enums/MessageSystemVendor.java b/src/main/java/com/dynatrace/oneagent/sdk/api/enums/MessageSystemVendor.java
index cc86d50..4ae51e7 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/enums/MessageSystemVendor.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/enums/MessageSystemVendor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,9 @@
/**
* Enumerates all well-known messaging systems. See {@link OneAgentSDK#createMessagingSystemInfo(String, String, MessageDestinationType, ChannelType, String)}.
- * Using these constants ensures that services captured by OneAgentSDK are handled the same way as traced via built-in sensors.
+ * Using these constants ensures that services captured by OneAgentSDK are handled the same way as traced via built-in sensors.
+ *
+ * @since 1.5
*/
public enum MessageSystemVendor {
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/enums/SDKState.java b/src/main/java/com/dynatrace/oneagent/sdk/api/enums/SDKState.java
index 303a91d..11e4884 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/enums/SDKState.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/enums/SDKState.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/infos/DatabaseInfo.java b/src/main/java/com/dynatrace/oneagent/sdk/api/infos/DatabaseInfo.java
new file mode 100644
index 0000000..cbd36b8
--- /dev/null
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/infos/DatabaseInfo.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2019 Dynatrace LLC
+ *
+ * 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.dynatrace.oneagent.sdk.api.infos;
+
+import com.dynatrace.oneagent.sdk.api.OneAgentSDK;
+
+/**
+ * Type returned by {@link OneAgentSDK#createDatabaseInfo(String, String, com.dynatrace.oneagent.sdk.api.enums.ChannelType, String)}
+ * @since 1.7.0
+ */
+public interface DatabaseInfo {
+
+}
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/infos/MessagingSystemInfo.java b/src/main/java/com/dynatrace/oneagent/sdk/api/infos/MessagingSystemInfo.java
index adffb5b..732e0d8 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/infos/MessagingSystemInfo.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/infos/MessagingSystemInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/api/infos/WebApplicationInfo.java b/src/main/java/com/dynatrace/oneagent/sdk/api/infos/WebApplicationInfo.java
index 7019d2e..90aead4 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/api/infos/WebApplicationInfo.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/api/infos/WebApplicationInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/OneAgentSDKFactoryImpl.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/OneAgentSDKFactoryImpl.java
index bfb9c73..d2d62be 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/OneAgentSDKFactoryImpl.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/OneAgentSDKFactoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,13 +30,10 @@ public class OneAgentSDKFactoryImpl {
* OneAgent), increase oneSdkFix only.
*/
static final int oneSdkMajor = 1;
- static final int oneSdkMinor = 5;
+ static final int oneSdkMinor = 7;
static final int oneSdkFix = 0;
- /** the only SDK instance (one for every classLoader) */
- private static OneAgentSDK oneSDK = null;
-
- public static boolean debugOneAgentSdkStub = false;
+ public static final boolean debugOneAgentSdkStub = Boolean.parseBoolean(System.getProperty("com.dynatrace.oneagent.sdk.debug", "false"));
private static OneAgentSDK createOneSDK() {
Object agentApiImpl = SDKInstanceProvider.create(oneSdkMajor, oneSdkMinor, oneSdkFix);
@@ -66,16 +63,11 @@ private static OneAgentSDK createOneSDK() {
}
}
- public static synchronized OneAgentSDK createInstance() {
- if (oneSDK == null) {
- debugOneAgentSdkStub = Boolean
- .parseBoolean(System.getProperty("com.dynatrace.oneagent.sdk.debug", "false"));
- oneSDK = createOneSDK();
- }
- return oneSDK;
+ public static OneAgentSDK createInstance() {
+ return createOneSDK();
}
public static void logDebug(String msg) {
System.out.println("[onesdk ] " + msg);
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/SDKInstanceProvider.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/SDKInstanceProvider.java
index f5a3252..7311cb9 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/SDKInstanceProvider.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/SDKInstanceProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/DatabaseInfoNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/DatabaseInfoNoop.java
new file mode 100644
index 0000000..13ca984
--- /dev/null
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/DatabaseInfoNoop.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2019 Dynatrace LLC
+ *
+ * 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.dynatrace.oneagent.sdk.impl.noop;
+
+import com.dynatrace.oneagent.sdk.api.infos.DatabaseInfo;
+
+public class DatabaseInfoNoop implements DatabaseInfo {
+ public static final DatabaseInfo INSTANCE = new DatabaseInfoNoop();
+}
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/DatabaseRequestTracerNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/DatabaseRequestTracerNoop.java
new file mode 100644
index 0000000..3252ac3
--- /dev/null
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/DatabaseRequestTracerNoop.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2019 Dynatrace LLC
+ *
+ * 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.dynatrace.oneagent.sdk.impl.noop;
+
+import com.dynatrace.oneagent.sdk.api.DatabaseRequestTracer;
+
+public class DatabaseRequestTracerNoop extends NodeNoop implements DatabaseRequestTracer {
+
+ public static final DatabaseRequestTracerNoop INSTANCE = new DatabaseRequestTracerNoop();
+
+ private DatabaseRequestTracerNoop() {
+ }
+
+ @Override
+ public void start() {
+ }
+
+ @Override
+ public void end() {
+ }
+
+ @Override
+ public void error(String message) {
+ }
+
+ @Override
+ public void error(Throwable throwable) {
+ }
+
+ @Override
+ public void setReturnedRowCount(int rowsReturned) {
+ }
+
+ @Override
+ public void setRoundTripCount(int roundTripCount) {
+ }
+
+}
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/InProcessLinkNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/InProcessLinkNoop.java
index da0c0d1..09f163e 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/InProcessLinkNoop.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/InProcessLinkNoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/InProcessLinkTracerNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/InProcessLinkTracerNoop.java
index c775be8..74ea9af 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/InProcessLinkTracerNoop.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/InProcessLinkTracerNoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/IncomingMessageProcessTracerNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/IncomingMessageProcessTracerNoop.java
index 1938e74..c47ef85 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/IncomingMessageProcessTracerNoop.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/IncomingMessageProcessTracerNoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/IncomingMessageReceiveTracerNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/IncomingMessageReceiveTracerNoop.java
index 99b98b8..2b21b85 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/IncomingMessageReceiveTracerNoop.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/IncomingMessageReceiveTracerNoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/IncomingWebRequestTracerNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/IncomingWebRequestTracerNoop.java
index 18fa25e..d5aecc2 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/IncomingWebRequestTracerNoop.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/IncomingWebRequestTracerNoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/MessagingSystemInfoNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/MessagingSystemInfoNoop.java
index ab3ea75..dcbbecf 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/MessagingSystemInfoNoop.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/MessagingSystemInfoNoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/NodeNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/NodeNoop.java
index f2e63c9..574acee 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/NodeNoop.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/NodeNoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/OneAgentSDKNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/OneAgentSDKNoop.java
index a804310..700dba9 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/OneAgentSDKNoop.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/OneAgentSDKNoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,6 +15,7 @@
*/
package com.dynatrace.oneagent.sdk.impl.noop;
+import com.dynatrace.oneagent.sdk.api.DatabaseRequestTracer;
import com.dynatrace.oneagent.sdk.api.InProcessLink;
import com.dynatrace.oneagent.sdk.api.InProcessLinkTracer;
import com.dynatrace.oneagent.sdk.api.IncomingMessageProcessTracer;
@@ -29,6 +30,7 @@
import com.dynatrace.oneagent.sdk.api.enums.ChannelType;
import com.dynatrace.oneagent.sdk.api.enums.MessageDestinationType;
import com.dynatrace.oneagent.sdk.api.enums.SDKState;
+import com.dynatrace.oneagent.sdk.api.infos.DatabaseInfo;
import com.dynatrace.oneagent.sdk.api.infos.MessagingSystemInfo;
import com.dynatrace.oneagent.sdk.api.infos.WebApplicationInfo;
@@ -124,4 +126,15 @@ public IncomingMessageReceiveTracer traceIncomingMessageReceive(MessagingSystemI
public IncomingMessageProcessTracer traceIncomingMessageProcess(MessagingSystemInfo messagingSystem) {
return IncomingMessageProcessTracerNoop.INSTANCE;
}
+
+ @Override
+ public DatabaseInfo createDatabaseInfo(String name, String vendor, ChannelType channelType,
+ String channelEndpoint) {
+ return DatabaseInfoNoop.INSTANCE;
+ }
+
+ @Override
+ public DatabaseRequestTracer traceSqlDatabaseRequest(DatabaseInfo databaseInfo, String statement) {
+ return DatabaseRequestTracerNoop.INSTANCE;
+ }
}
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/OutgoingMessageTracerNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/OutgoingMessageTracerNoop.java
index 24aa263..f0602ff 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/OutgoingMessageTracerNoop.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/OutgoingMessageTracerNoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/OutgoingWebRequestTracerNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/OutgoingWebRequestTracerNoop.java
index 9841b04..45cb3b6 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/OutgoingWebRequestTracerNoop.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/OutgoingWebRequestTracerNoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/RemoteCallClientTracerNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/RemoteCallClientTracerNoop.java
index cec8d49..1ab9b6c 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/RemoteCallClientTracerNoop.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/RemoteCallClientTracerNoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/RemoteCallServerTracerNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/RemoteCallServerTracerNoop.java
index fed6339..610d071 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/RemoteCallServerTracerNoop.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/RemoteCallServerTracerNoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/WebApplicationInfoNoop.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/WebApplicationInfoNoop.java
index 14becec..2a7f14b 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/WebApplicationInfoNoop.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/noop/WebApplicationInfoNoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/DatabaseInfoImpl.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/DatabaseInfoImpl.java
new file mode 100644
index 0000000..307e2d6
--- /dev/null
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/DatabaseInfoImpl.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2019 Dynatrace LLC
+ *
+ * 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.dynatrace.oneagent.sdk.impl.proxy;
+
+import com.dynatrace.oneagent.sdk.api.enums.ChannelType;
+import com.dynatrace.oneagent.sdk.api.infos.DatabaseInfo;
+
+public class DatabaseInfoImpl implements DatabaseInfo {
+
+ private final String name;
+ private final String vendor;
+ private final ChannelType channelType;
+ private final String channelEndpoint;
+
+ DatabaseInfoImpl(String name, String vendor, ChannelType channelType, String channelEndpoint) {
+ this.name = name;
+ this.vendor = vendor;
+ this.channelType = channelType;
+ this.channelEndpoint = channelEndpoint;
+ }
+
+ String getName() {
+ return name;
+ }
+
+ String getVendor() {
+ return vendor;
+ }
+
+ ChannelType getChannelType() {
+ return channelType;
+ }
+
+ String getChannelEndpoint() {
+ return channelEndpoint;
+ }
+}
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/DatabaseRequestTracerProxy.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/DatabaseRequestTracerProxy.java
new file mode 100644
index 0000000..19940bd
--- /dev/null
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/DatabaseRequestTracerProxy.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2019 Dynatrace LLC
+ *
+ * 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.dynatrace.oneagent.sdk.impl.proxy;
+
+import com.dynatrace.oneagent.sdk.api.DatabaseRequestTracer;
+
+public class DatabaseRequestTracerProxy extends TraceableProxy implements DatabaseRequestTracer {
+
+ DatabaseRequestTracerProxy(SDK2AgentInternalApiProxy apiProxy, Object outgoingMessageTracer) {
+ super(apiProxy, outgoingMessageTracer);
+ }
+
+ @Override
+ public void setReturnedRowCount(int rowsReturned) {
+ apiProxy.databaseRequestTracer_setRowsReturned(agentsNodeObject, rowsReturned);
+ }
+
+ @Override
+ public void setRoundTripCount(int roundTripCount) {
+ apiProxy.databaseRequestTracer_setRoundTripCount(agentsNodeObject, roundTripCount);
+ }
+
+}
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/InProcessLinkImpl.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/InProcessLinkImpl.java
index 198bd96..300d464 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/InProcessLinkImpl.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/InProcessLinkImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/InProcessLinkTracerProxy.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/InProcessLinkTracerProxy.java
index 340f21b..b11266d 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/InProcessLinkTracerProxy.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/InProcessLinkTracerProxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/IncomingMessageProcessTracerProxy.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/IncomingMessageProcessTracerProxy.java
index f27e557..3c94c3b 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/IncomingMessageProcessTracerProxy.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/IncomingMessageProcessTracerProxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/IncomingMessageReceiveTracerProxy.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/IncomingMessageReceiveTracerProxy.java
index 636b83c..8a4826e 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/IncomingMessageReceiveTracerProxy.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/IncomingMessageReceiveTracerProxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/IncomingWebRequestProxy.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/IncomingWebRequestProxy.java
index 43f515c..bf3a1f1 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/IncomingWebRequestProxy.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/IncomingWebRequestProxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/MessagingSystemInfoImpl.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/MessagingSystemInfoImpl.java
index 1561f85..a0b5e50 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/MessagingSystemInfoImpl.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/MessagingSystemInfoImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/OneAgentSDKProxy.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/OneAgentSDKProxy.java
index 81eb93e..24a0bee 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/OneAgentSDKProxy.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/OneAgentSDKProxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,6 +15,7 @@
*/
package com.dynatrace.oneagent.sdk.impl.proxy;
+import com.dynatrace.oneagent.sdk.api.DatabaseRequestTracer;
import com.dynatrace.oneagent.sdk.api.InProcessLink;
import com.dynatrace.oneagent.sdk.api.InProcessLinkTracer;
import com.dynatrace.oneagent.sdk.api.IncomingMessageProcessTracer;
@@ -29,9 +30,12 @@
import com.dynatrace.oneagent.sdk.api.enums.ChannelType;
import com.dynatrace.oneagent.sdk.api.enums.MessageDestinationType;
import com.dynatrace.oneagent.sdk.api.enums.SDKState;
+import com.dynatrace.oneagent.sdk.api.infos.DatabaseInfo;
import com.dynatrace.oneagent.sdk.api.infos.MessagingSystemInfo;
import com.dynatrace.oneagent.sdk.api.infos.WebApplicationInfo;
import com.dynatrace.oneagent.sdk.impl.OneAgentSDKFactoryImpl;
+import com.dynatrace.oneagent.sdk.impl.noop.DatabaseInfoNoop;
+import com.dynatrace.oneagent.sdk.impl.noop.DatabaseRequestTracerNoop;
import com.dynatrace.oneagent.sdk.impl.noop.InProcessLinkNoop;
import com.dynatrace.oneagent.sdk.impl.noop.InProcessLinkTracerNoop;
import com.dynatrace.oneagent.sdk.impl.noop.IncomingMessageProcessTracerNoop;
@@ -268,4 +272,32 @@ public IncomingMessageProcessTracer traceIncomingMessageProcess(MessagingSystemI
return new IncomingMessageProcessTracerProxy(apiProxy, agentObject);
}
+ @Override
+ public DatabaseInfo createDatabaseInfo(String name, String vendor, ChannelType channelType,
+ String channelEndpoint) {
+ return new DatabaseInfoImpl(name, vendor, channelType, channelEndpoint);
+ }
+
+ @Override
+ public DatabaseRequestTracer traceSqlDatabaseRequest(DatabaseInfo databaseInfo, String statement) {
+ if (databaseInfo instanceof DatabaseInfoNoop) {
+ return DatabaseRequestTracerNoop.INSTANCE;
+ } else if (!(databaseInfo instanceof DatabaseInfoImpl)) {
+ if (OneAgentSDKFactoryImpl.debugOneAgentSdkStub) {
+ OneAgentSDKFactoryImpl.logDebug("- invalid DatabaseInfo object provided: "
+ + (databaseInfo == null ? "null" : databaseInfo.getClass().getName()));
+ }
+ return DatabaseRequestTracerNoop.INSTANCE;
+ }
+
+ Object agentObject = apiProxy.oneAgentSDK_traceSQLDatabaseRequest(agentSdkImpl, (DatabaseInfoImpl) databaseInfo, statement);
+ if (agentObject == null) {
+ if (OneAgentSDKFactoryImpl.debugOneAgentSdkStub) {
+ OneAgentSDKFactoryImpl.logDebug("- OneAgent failed to provide provide object");
+ }
+ return DatabaseRequestTracerNoop.INSTANCE;
+ }
+ return new DatabaseRequestTracerProxy(apiProxy, agentObject);
+ }
+
}
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/OutgoingMessageTracerProxy.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/OutgoingMessageTracerProxy.java
index 10f1bc8..838c59c 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/OutgoingMessageTracerProxy.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/OutgoingMessageTracerProxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/OutgoingWebRequestTracerProxy.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/OutgoingWebRequestTracerProxy.java
index db8c2e7..180fe72 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/OutgoingWebRequestTracerProxy.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/OutgoingWebRequestTracerProxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/RemoteCallClientProxy.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/RemoteCallClientProxy.java
index bd9e937..28bc7c6 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/RemoteCallClientProxy.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/RemoteCallClientProxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/RemoteCallServerProxy.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/RemoteCallServerProxy.java
index 73c713f..e074bed 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/RemoteCallServerProxy.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/RemoteCallServerProxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/SDK2AgentInternalApiProxy.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/SDK2AgentInternalApiProxy.java
index 4051a83..18198d6 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/SDK2AgentInternalApiProxy.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/SDK2AgentInternalApiProxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -44,6 +44,7 @@ public class SDK2AgentInternalApiProxy {
private final Method oneAgentSDK_traceIncomingMessageReceive;
private final Method oneAgentSDK_traceIncomingMessageProcess;
private final Method oneAgentSDK_traceOutgoingMessage;
+ private final Method oneAgentSDK_traceSQLDatabaseRequest;
private final Method tracer_start;
private final Method tracer_end;
private final Method tracer_error_1; // string
@@ -61,6 +62,9 @@ public class SDK2AgentInternalApiProxy {
private final Method incomingWebRequestTracer_addParameter;
private final Method messageTracer_setVendorMessageId;
private final Method messageTracer_setCorrelationId;
+ private final Method databaseRequestTracer_setRowsReturned;
+ private final Method databaseRequestTracer_setRoundTripCount;
+
public SDK2AgentInternalApiProxy(Object agentImpl) throws NoSuchMethodException, SecurityException {
this.agentImpl = agentImpl;
@@ -89,8 +93,10 @@ public SDK2AgentInternalApiProxy(Object agentImpl) throws NoSuchMethodException,
new Class[] { Object.class, String.class, String.class, String.class, Integer.TYPE, String.class });
oneAgentSDK_traceIncomingMessageProcess = findMethod("oneAgentSDK_traceIncomingMessageProcess",
new Class[] { Object.class, String.class, String.class, String.class, Integer.TYPE, String.class });
- oneAgentSDK_traceOutgoingMessage =findMethod("oneAgentSDK_traceOutgoingMessage",
+ oneAgentSDK_traceOutgoingMessage = findMethod("oneAgentSDK_traceOutgoingMessage",
new Class[] { Object.class, String.class, String.class, String.class, Integer.TYPE, String.class });
+ oneAgentSDK_traceSQLDatabaseRequest = findMethod("oneAgentSDK_traceSQLDatabaseRequest",
+ new Class[] { Object.class, String.class, String.class, Integer.TYPE, String.class, String.class });
tracer_start = findMethod("tracer_start", new Class[] { Object.class });
tracer_end = findMethod("tracer_end", new Class[] { Object.class });
tracer_error_1 = findMethod("tracer_error", new Class[] { Object.class, String.class });
@@ -121,6 +127,10 @@ public SDK2AgentInternalApiProxy(Object agentImpl) throws NoSuchMethodException,
new Class[] { Object.class, String.class });
messageTracer_setCorrelationId = findMethod("messageTracer_setCorrelationId",
new Class[] { Object.class, String.class });
+ databaseRequestTracer_setRowsReturned = findMethod("databaseRequestTracer_setRowsReturned",
+ new Class[] { Object.class, Integer.TYPE });
+ databaseRequestTracer_setRoundTripCount = findMethod("databaseRequestTracer_setRoundTripCount",
+ new Class[] { Object.class, Integer.TYPE });
}
private Method findMethod(String name, Class>... args) throws NoSuchMethodException, SecurityException {
@@ -174,19 +184,28 @@ Object oneAgentSDK_traceOutgoingWebRequest(Object agentSdkImpl, String url, Stri
Object oneAgentSDK_traceOutgoingMessage(Object agentSdkImpl, MessagingSystemInfoImpl messagingSystem) {
return invoke(oneAgentSDK_traceOutgoingMessage, agentSdkImpl, messagingSystem.getVendorName(),
messagingSystem.getDestinationName(), messagingSystem.getDestinationType().getName(),
- messagingSystem.getChannelType().getSDKConstant(),messagingSystem.getChannelEndpoint());
+ messagingSystem.getChannelType() == null ? -1 : messagingSystem.getChannelType().getSDKConstant(),
+ messagingSystem.getChannelEndpoint());
}
Object oneAgentSDK_traceIncomingMessageReceive(Object agentSdkImpl, MessagingSystemInfoImpl messagingSystem) {
return invoke(oneAgentSDK_traceIncomingMessageReceive, agentSdkImpl, messagingSystem.getVendorName(),
messagingSystem.getDestinationName(), messagingSystem.getDestinationType().getName(),
- messagingSystem.getChannelType().getSDKConstant(),messagingSystem.getChannelEndpoint());
+ messagingSystem.getChannelType() == null ? -1 : messagingSystem.getChannelType().getSDKConstant(),
+ messagingSystem.getChannelEndpoint());
}
Object oneAgentSDK_traceIncomingMessageProcess(Object agentSdkImpl, MessagingSystemInfoImpl messagingSystem) {
return invoke(oneAgentSDK_traceIncomingMessageProcess, agentSdkImpl, messagingSystem.getVendorName(),
messagingSystem.getDestinationName(), messagingSystem.getDestinationType().getName(),
- messagingSystem.getChannelType().getSDKConstant(),messagingSystem.getChannelEndpoint());
+ messagingSystem.getChannelType() == null ? -1 : messagingSystem.getChannelType().getSDKConstant(),
+ messagingSystem.getChannelEndpoint());
+ }
+
+ Object oneAgentSDK_traceSQLDatabaseRequest(Object agentSdkImpl, DatabaseInfoImpl databaseInfo, String sql) {
+ return invoke(oneAgentSDK_traceSQLDatabaseRequest, agentSdkImpl, databaseInfo.getName(), databaseInfo.getVendor(),
+ databaseInfo.getChannelType() == null ? -1 : databaseInfo.getChannelType().getSDKConstant(),
+ databaseInfo.getChannelEndpoint(), sql);
}
void oneAgentSDK_setLoggingCallback(Object sdk, Object loggingCallback) {
@@ -277,4 +296,12 @@ void messageTracer_setCorrelationId(Object messageTracer, String correlationId)
invoke(messageTracer_setCorrelationId, messageTracer, correlationId);
}
+ void databaseRequestTracer_setRowsReturned(Object databaseRequestTracer, int rowsReturned) {
+ invoke(databaseRequestTracer_setRowsReturned, databaseRequestTracer, rowsReturned);
+ }
+
+ void databaseRequestTracer_setRoundTripCount(Object databaseRequestTracer, int roundTripCount) {
+ invoke(databaseRequestTracer_setRoundTripCount, databaseRequestTracer, roundTripCount);
+ }
+
}
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/TraceableProxy.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/TraceableProxy.java
index 29a946d..6d98f23 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/TraceableProxy.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/TraceableProxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/WebApplicationInfoImpl.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/WebApplicationInfoImpl.java
index 9cf2a96..acf876f 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/WebApplicationInfoImpl.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/WebApplicationInfoImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/package-info.java b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/package-info.java
index 6d3936f..e9b09db 100644
--- a/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/package-info.java
+++ b/src/main/java/com/dynatrace/oneagent/sdk/impl/proxy/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Dynatrace LLC
+ * Copyright 2019 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.