Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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.
*/
"use strict";
// tslint:disable:no-console
// ----------------------------------------------------------------------------
const Sdk = require("@dynatrace/oneagent-sdk");
const Api = Sdk.createInstance();
// ----------------------------------------------------------------------------
if (Api.getCurrentState() !== Sdk.SDKState.ACTIVE) {
console.error("IncomingRemoteCallSample: SDK is not active!");
}
// install logging callbacks
Api.setLoggingCallbacks({
warning: (msg) => console.error("IncomingRemoteCallSample SDK warning: " + msg),
error: (msg) => console.error("IncomingRemoteCallSample SDK error: " + msg)
});
// ----------------------------------------------------------------------------
// Function actually processing the message
async function processMessage(message) {
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.
*/
"use strict";
// tslint:disable:no-console
// ----------------------------------------------------------------------------
const Sdk = require("@dynatrace/oneagent-sdk");
const Api = Sdk.createInstance();
// ----------------------------------------------------------------------------
if (Api.getCurrentState() !== Sdk.SDKState.ACTIVE) {
console.error("CustomRequestAttributesSample: SDK is not active!");
}
// install logging callbacks
Api.setLoggingCallbacks({
warning: (msg) => console.error("CustomRequestAttributesSample SDK warning: " + msg),
error: (msg) => console.error("CustomRequestAttributesSample SDK error: " + msg)
});
// ----------------------------------------------------------------------------
const http = require("http");
// ----------------------------------------------------------------------------
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.
*/
"use strict";
// tslint:disable:no-console
// ----------------------------------------------------------------------------
const Sdk = require("@dynatrace/oneagent-sdk");
const Api = Sdk.createInstance();
// ----------------------------------------------------------------------------
if (Api.getCurrentState() !== Sdk.SDKState.ACTIVE) {
console.error("DatabaseRequestSample: SDK is not active!");
}
// install logging callbacks
Api.setLoggingCallbacks({
warning: (msg) => console.error("DatabaseRequestSample SDK warning: " + msg),
error: (msg) => console.error("DatabaseRequestSample SDK error: " + msg)
});
// ----------------------------------------------------------------------------
const http = require("http");
// ----------------------------------------------------------------------------
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.
*/
"use strict";
// tslint:disable:no-console
// ----------------------------------------------------------------------------
const Sdk = require("@dynatrace/oneagent-sdk");
const Api = Sdk.createInstance();
// ----------------------------------------------------------------------------
if (Api.getCurrentState() !== Sdk.SDKState.ACTIVE) {
console.error("OutgoingRemoteCallSample: SDK is not active!");
}
// install logging callbacks
Api.setLoggingCallbacks({
warning: (msg) => console.error("OutgoingRemoteCallSample SDK warning: " + msg),
error: (msg) => console.error("OutgoingRemoteCallSample SDK error: " + msg)
});
// ----------------------------------------------------------------------------
const cp = require("child_process");
let id = 0;