Skip to content

Commit b3824c4

Browse files
committed
smaller fixes
- add license - rename
1 parent ff98205 commit b3824c4

File tree

3 files changed

+29
-13
lines changed

3 files changed

+29
-13
lines changed

samples/remotecall/remotecall-client/src/main/java/com/dynatrace/sample/oneagent/sdk/ClientApp.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.dynatrace.sample.oneagent.sdk;
22

33
/*
4-
* Copyright 2017 Dynatrace LLC
4+
* Copyright 2018 Dynatrace LLC
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -86,16 +86,16 @@ private void run(int port) throws IOException, ClassNotFoundException {
8686
}
8787

8888
private void traceCallToServer(ObjectOutputStream out, int port) throws IOException {
89-
OutgoingRemoteCallTracer externalOutgoingRemoteCall = oneAgentSdk.traceOutgoingRemoteCall("myMethod", "myService", "endpoint", ChannelType.IN_PROCESS, "localhost:" + port);
90-
externalOutgoingRemoteCall.start();
89+
OutgoingRemoteCallTracer outgoingRemoteCall = oneAgentSdk.traceOutgoingRemoteCall("myMethod", "myService", "endpoint", ChannelType.IN_PROCESS, "localhost:" + port);
90+
outgoingRemoteCall.start();
9191
try {
92-
String outgoingTag = externalOutgoingRemoteCall.getDynatraceStringTag();
92+
String outgoingTag = outgoingRemoteCall.getDynatraceStringTag();
9393
System.out.println("send tag to server: " + outgoingTag);
9494
invokeCallToServer(out, outgoingTag);
9595
} catch (Exception e) {
96-
externalOutgoingRemoteCall.error(e);
96+
outgoingRemoteCall.error(e);
9797
} finally {
98-
externalOutgoingRemoteCall.end();
98+
outgoingRemoteCall.end();
9999
}
100100
}
101101

samples/remotecall/remotecall-server/src/main/java/com/dynatrace/sample/oneagent/sdk/ServerApp.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.dynatrace.sample.oneagent.sdk;
22

33
/*
4-
* Copyright 2017 Dynatrace LLC
4+
* Copyright 2018 Dynatrace LLC
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -101,22 +101,22 @@ private void run(int port) throws IOException, ClassNotFoundException {
101101
}
102102

103103
private void traceClientRequest(Object receivedTag) {
104-
IncomingRemoteCallTracer externalIncomingRemoteCall = oneAgentSdk.traceIncomingRemoteCall("myMethod", "myService", "endpoint");
104+
IncomingRemoteCallTracer incomingRemoteCall = oneAgentSdk.traceIncomingRemoteCall("myMethod", "myService", "endpoint");
105105
if (receivedTag instanceof String) {
106-
externalIncomingRemoteCall.setDynatraceStringTag((String) receivedTag);
106+
incomingRemoteCall.setDynatraceStringTag((String) receivedTag);
107107
} else if (receivedTag instanceof byte[]) {
108-
externalIncomingRemoteCall.setDynatraceByteTag((byte[]) receivedTag);
108+
incomingRemoteCall.setDynatraceByteTag((byte[]) receivedTag);
109109
} else {
110110
System.err.println("invalid tag received: " + receivedTag.getClass().toString());
111111
}
112112

113-
externalIncomingRemoteCall.start();
113+
incomingRemoteCall.start();
114114
try {
115115
handleClientRequest();
116116
} catch (Exception e) {
117-
externalIncomingRemoteCall.error(e);
117+
incomingRemoteCall.error(e);
118118
} finally {
119-
externalIncomingRemoteCall.end();
119+
incomingRemoteCall.end();
120120
}
121121

122122
}

samples/remotecall/remotecall-server/src/main/java/com/dynatrace/sample/oneagent/sdk/StdErrLoggingCallback.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
package com.dynatrace.sample.oneagent.sdk;
22

3+
/*
4+
* Copyright 2018 Dynatrace LLC
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
319
import com.dynatrace.oneagent.sdk.api.LoggingCallback;
420

521
/**

0 commit comments

Comments
 (0)