{"action":"created","comment":{"url":"https://api.github.com/repos/instana/nodejs-sensor/pulls/comments/215916186","pull_request_review_id":153287724,"id":215916186,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTkxNjE4Ng==","diff_hunk":"@@ -0,0 +1,552 @@\n+/* eslint-disable no-console */\n+\n+'use strict';\n+\n+require('../../../')({\n+  agentPort: process.env.AGENT_PORT,\n+  level: 'info',\n+  tracing: {\n+    forceTransmissionStartingAt: 1\n+  }\n+});\n+\n+\n+var bodyParser = require('body-parser');\n+var express = require('express');\n+var morgan = require('morgan');\n+var sql = require('mssql');\n+var devNull = require('dev-null');\n+\n+var pool;\n+var app = express();\n+var logPrefix = 'Express / MSSQL App (' + process.pid + '):\\t';\n+\n+\n+sql.on('error', function(err) {\n+  log(err);\n+});\n+\n+\n+var dbHost = process.env.MSSQL_HOST ? process.env.MSSQL_HOST : '127.0.0.1';\n+var dbPort = process.env.MSSQL_PORT ? parseInt(process.env.MSSQL_PORT, 10) : 1433;\n+var dbUrl = dbHost + ':' + dbPort;\n+var dbUser = process.env.MSSQL_USER ? process.env.MSSQL_USER : 'sa';\n+var dbPassword = process.env.MSSQL_PW ? process.env.MSSQL_PW : 'stanCanHazMsSQL1';\n+var initConnectString = 'mssql://' + dbUser + ':' + dbPassword + '@' + dbUrl + '/tempdb';\n+var dbName = 'nodejssensor';\n+var ready = false;\n+\n+\n+sql\n+  .connect(initConnectString)\n+  .then(function() {\n+    return new sql.Request().query(\n+      'IF EXISTS (SELECT * FROM sys.databases WHERE name = N\\'' + dbName + '\\') DROP DATABASE ' + dbName\n+    );\n+  })\n+  .then(function() {\n+    return new sql.Request().query('CREATE DATABASE ' + dbName);\n+  })\n+  .then(function() {\n+    return sql.close();\n+  })\n+  .then(function() {\n+    return sql.connect({\n+      user: dbUser,\n+      password: dbPassword,\n+      server: dbHost,\n+      port: dbPort,\n+      database: dbName\n+    });\n+  })\n+  .then(function(_pool) {\n+    pool = _pool;\n+    return new sql.Request().query(\n+      'CREATE TABLE UserTable (id INT IDENTITY(1,1), name VARCHAR(40) NOT NULL, email VARCHAR(40) NOT NULL)'\n+    );\n+  })\n+  .then(function() {\n+    return new sql.Request().batch(\n+      'CREATE PROCEDURE testProcedure' +\n+      '    @username nvarchar(40)' +\n+      'AS' +\n+      '    SET NOCOUNT ON;' +\n+      '    SELECT name, email' +\n+      '    FROM UserTable' +\n+      '    WHERE name = @username;'\n+    );\n+  })\n+  .then(function() {","path":"test/tracing/mssql/app.js","position":80,"original_position":79,"commit_id":"4f217b5ec0ed7c7d1d3e46819361e9382ebc4667","original_commit_id":"f8505e16b2124641a06a966aaca0494ce8b7fcde","user":{"login":"basti1302","id":73801,"node_id":"MDQ6VXNlcjczODAx","avatar_url":"https://avatars3.githubusercontent.com/u/73801?v=4","gravatar_id":"","url":"https://api.github.com/users/basti1302","html_url":"https://github.com/basti1302","followers_url":"https://api.github.com/users/basti1302/followers","following_url":"https://api.github.com/users/basti1302/following{/other_user}","gists_url":"https://api.github.com/users/basti1302/gists{/gist_id}","starred_url":"https://api.github.com/users/basti1302/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basti1302/subscriptions","organizations_url":"https://api.github.com/users/basti1302/orgs","repos_url":"https://api.github.com/users/basti1302/repos","events_url":"https://api.github.com/users/basti1302/events{/privacy}","received_events_url":"https://api.github.com/users/basti1302/received_events","type":"User","site_admin":false},"body":"Funny, only saw this comment now but that's exactly what I did in the last commit.\r\n\r\nAnd turns you were somewhat right: cls.ns.set actually throws in that setup because there hasn't been any previous call to cls.ns.bind et al.","created_at":"2018-09-07T10:29:15Z","updated_at":"2018-09-07T10:29:15Z","html_url":"https://github.com/instana/nodejs-sensor/pull/78#discussion_r215916186","pull_request_url":"https://api.github.com/repos/instana/nodejs-sensor/pulls/78","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/instana/nodejs-sensor/pulls/comments/215916186"},"html":{"href":"https://github.com/instana/nodejs-sensor/pull/78#discussion_r215916186"},"pull_request":{"href":"https://api.github.com/repos/instana/nodejs-sensor/pulls/78"}},"in_reply_to_id":215879883},"pull_request":{"url":"https://api.github.com/repos/instana/nodejs-sensor/pulls/78","id":212940890,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyOTQwODkw","html_url":"https://github.com/instana/nodejs-sensor/pull/78","diff_url":"https://github.com/instana/nodejs-sensor/pull/78.diff","patch_url":"https://github.com/instana/nodejs-sensor/pull/78.patch","issue_url":"https://api.github.com/repos/instana/nodejs-sensor/issues/78","number":78,"state":"open","locked":false,"title":"feat(tracing): instrument MSSQL","user":{"login":"basti1302","id":73801,"node_id":"MDQ6VXNlcjczODAx","avatar_url":"https://avatars3.githubusercontent.com/u/73801?v=4","gravatar_id":"","url":"https://api.github.com/users/basti1302","html_url":"https://github.com/basti1302","followers_url":"https://api.github.com/users/basti1302/followers","following_url":"https://api.github.com/users/basti1302/following{/other_user}","gists_url":"https://api.github.com/users/basti1302/gists{/gist_id}","starred_url":"https://api.github.com/users/basti1302/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basti1302/subscriptions","organizations_url":"https://api.github.com/users/basti1302/orgs","repos_url":"https://api.github.com/users/basti1302/repos","events_url":"https://api.github.com/users/basti1302/events{/privacy}","received_events_url":"https://api.github.com/users/basti1302/received_events","type":"User","site_admin":false},"body":"Adds MSSQL (Microsoft SQL Server) instrumentation (supports [mssql](https://www.npmjs.com/package/mssql), version >= 4 via [tedious driver](https://www.npmjs.com/package/tedious)).","created_at":"2018-09-04T11:18:28Z","updated_at":"2018-09-07T10:29:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7de567cab890d5e1b2f2bb786e8bd2838ba49d18","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":888371127,"node_id":"MDU6TGFiZWw4ODgzNzExMjc=","url":"https://api.github.com/repos/instana/nodejs-sensor/labels/review%20&%20merge","name":"review & merge","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/instana/nodejs-sensor/pulls/78/commits","review_comments_url":"https://api.github.com/repos/instana/nodejs-sensor/pulls/78/comments","review_comment_url":"https://api.github.com/repos/instana/nodejs-sensor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/instana/nodejs-sensor/issues/78/comments","statuses_url":"https://api.github.com/repos/instana/nodejs-sensor/statuses/4f217b5ec0ed7c7d1d3e46819361e9382ebc4667","head":{"label":"instana:mssql-instrumentation","ref":"mssql-instrumentation","sha":"4f217b5ec0ed7c7d1d3e46819361e9382ebc4667","user":{"login":"instana","id":5128994,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxMjg5OTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5128994?v=4","gravatar_id":"","url":"https://api.github.com/users/instana","html_url":"https://github.com/instana","followers_url":"https://api.github.com/users/instana/followers","following_url":"https://api.github.com/users/instana/following{/other_user}","gists_url":"https://api.github.com/users/instana/gists{/gist_id}","starred_url":"https://api.github.com/users/instana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instana/subscriptions","organizations_url":"https://api.github.com/users/instana/orgs","repos_url":"https://api.github.com/users/instana/repos","events_url":"https://api.github.com/users/instana/events{/privacy}","received_events_url":"https://api.github.com/users/instana/received_events","type":"Organization","site_admin":false},"repo":{"id":47403260,"node_id":"MDEwOlJlcG9zaXRvcnk0NzQwMzI2MA==","name":"nodejs-sensor","full_name":"instana/nodejs-sensor","owner":{"login":"instana","id":5128994,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxMjg5OTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5128994?v=4","gravatar_id":"","url":"https://api.github.com/users/instana","html_url":"https://github.com/instana","followers_url":"https://api.github.com/users/instana/followers","following_url":"https://api.github.com/users/instana/following{/other_user}","gists_url":"https://api.github.com/users/instana/gists{/gist_id}","starred_url":"https://api.github.com/users/instana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instana/subscriptions","organizations_url":"https://api.github.com/users/instana/orgs","repos_url":"https://api.github.com/users/instana/repos","events_url":"https://api.github.com/users/instana/events{/privacy}","received_events_url":"https://api.github.com/users/instana/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/instana/nodejs-sensor","description":"Node.js sensor for Instana","fork":false,"url":"https://api.github.com/repos/instana/nodejs-sensor","forks_url":"https://api.github.com/repos/instana/nodejs-sensor/forks","keys_url":"https://api.github.com/repos/instana/nodejs-sensor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/instana/nodejs-sensor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/instana/nodejs-sensor/teams","hooks_url":"https://api.github.com/repos/instana/nodejs-sensor/hooks","issue_events_url":"https://api.github.com/repos/instana/nodejs-sensor/issues/events{/number}","events_url":"https://api.github.com/repos/instana/nodejs-sensor/events","assignees_url":"https://api.github.com/repos/instana/nodejs-sensor/assignees{/user}","branches_url":"https://api.github.com/repos/instana/nodejs-sensor/branches{/branch}","tags_url":"https://api.github.com/repos/instana/nodejs-sensor/tags","blobs_url":"https://api.github.com/repos/instana/nodejs-sensor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/instana/nodejs-sensor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/instana/nodejs-sensor/git/refs{/sha}","trees_url":"https://api.github.com/repos/instana/nodejs-sensor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/instana/nodejs-sensor/statuses/{sha}","languages_url":"https://api.github.com/repos/instana/nodejs-sensor/languages","stargazers_url":"https://api.github.com/repos/instana/nodejs-sensor/stargazers","contributors_url":"https://api.github.com/repos/instana/nodejs-sensor/contributors","subscribers_url":"https://api.github.com/repos/instana/nodejs-sensor/subscribers","subscription_url":"https://api.github.com/repos/instana/nodejs-sensor/subscription","commits_url":"https://api.github.com/repos/instana/nodejs-sensor/commits{/sha}","git_commits_url":"https://api.github.com/repos/instana/nodejs-sensor/git/commits{/sha}","comments_url":"https://api.github.com/repos/instana/nodejs-sensor/comments{/number}","issue_comment_url":"https://api.github.com/repos/instana/nodejs-sensor/issues/comments{/number}","contents_url":"https://api.github.com/repos/instana/nodejs-sensor/contents/{+path}","compare_url":"https://api.github.com/repos/instana/nodejs-sensor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/instana/nodejs-sensor/merges","archive_url":"https://api.github.com/repos/instana/nodejs-sensor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/instana/nodejs-sensor/downloads","issues_url":"https://api.github.com/repos/instana/nodejs-sensor/issues{/number}","pulls_url":"https://api.github.com/repos/instana/nodejs-sensor/pulls{/number}","milestones_url":"https://api.github.com/repos/instana/nodejs-sensor/milestones{/number}","notifications_url":"https://api.github.com/repos/instana/nodejs-sensor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/instana/nodejs-sensor/labels{/name}","releases_url":"https://api.github.com/repos/instana/nodejs-sensor/releases{/id}","deployments_url":"https://api.github.com/repos/instana/nodejs-sensor/deployments","created_at":"2015-12-04T12:38:55Z","updated_at":"2018-09-07T08:42:00Z","pushed_at":"2018-09-07T10:27:33Z","git_url":"git://github.com/instana/nodejs-sensor.git","ssh_url":"git@github.com:instana/nodejs-sensor.git","clone_url":"https://github.com/instana/nodejs-sensor.git","svn_url":"https://github.com/instana/nodejs-sensor","homepage":null,"size":773,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":13,"open_issues":5,"watchers":12,"default_branch":"master"}},"base":{"label":"instana:master","ref":"master","sha":"8a058d1d79c536ab45478b031969218cdc1d4d0f","user":{"login":"instana","id":5128994,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxMjg5OTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5128994?v=4","gravatar_id":"","url":"https://api.github.com/users/instana","html_url":"https://github.com/instana","followers_url":"https://api.github.com/users/instana/followers","following_url":"https://api.github.com/users/instana/following{/other_user}","gists_url":"https://api.github.com/users/instana/gists{/gist_id}","starred_url":"https://api.github.com/users/instana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instana/subscriptions","organizations_url":"https://api.github.com/users/instana/orgs","repos_url":"https://api.github.com/users/instana/repos","events_url":"https://api.github.com/users/instana/events{/privacy}","received_events_url":"https://api.github.com/users/instana/received_events","type":"Organization","site_admin":false},"repo":{"id":47403260,"node_id":"MDEwOlJlcG9zaXRvcnk0NzQwMzI2MA==","name":"nodejs-sensor","full_name":"instana/nodejs-sensor","owner":{"login":"instana","id":5128994,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxMjg5OTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5128994?v=4","gravatar_id":"","url":"https://api.github.com/users/instana","html_url":"https://github.com/instana","followers_url":"https://api.github.com/users/instana/followers","following_url":"https://api.github.com/users/instana/following{/other_user}","gists_url":"https://api.github.com/users/instana/gists{/gist_id}","starred_url":"https://api.github.com/users/instana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instana/subscriptions","organizations_url":"https://api.github.com/users/instana/orgs","repos_url":"https://api.github.com/users/instana/repos","events_url":"https://api.github.com/users/instana/events{/privacy}","received_events_url":"https://api.github.com/users/instana/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/instana/nodejs-sensor","description":"Node.js sensor for Instana","fork":false,"url":"https://api.github.com/repos/instana/nodejs-sensor","forks_url":"https://api.github.com/repos/instana/nodejs-sensor/forks","keys_url":"https://api.github.com/repos/instana/nodejs-sensor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/instana/nodejs-sensor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/instana/nodejs-sensor/teams","hooks_url":"https://api.github.com/repos/instana/nodejs-sensor/hooks","issue_events_url":"https://api.github.com/repos/instana/nodejs-sensor/issues/events{/number}","events_url":"https://api.github.com/repos/instana/nodejs-sensor/events","assignees_url":"https://api.github.com/repos/instana/nodejs-sensor/assignees{/user}","branches_url":"https://api.github.com/repos/instana/nodejs-sensor/branches{/branch}","tags_url":"https://api.github.com/repos/instana/nodejs-sensor/tags","blobs_url":"https://api.github.com/repos/instana/nodejs-sensor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/instana/nodejs-sensor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/instana/nodejs-sensor/git/refs{/sha}","trees_url":"https://api.github.com/repos/instana/nodejs-sensor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/instana/nodejs-sensor/statuses/{sha}","languages_url":"https://api.github.com/repos/instana/nodejs-sensor/languages","stargazers_url":"https://api.github.com/repos/instana/nodejs-sensor/stargazers","contributors_url":"https://api.github.com/repos/instana/nodejs-sensor/contributors","subscribers_url":"https://api.github.com/repos/instana/nodejs-sensor/subscribers","subscription_url":"https://api.github.com/repos/instana/nodejs-sensor/subscription","commits_url":"https://api.github.com/repos/instana/nodejs-sensor/commits{/sha}","git_commits_url":"https://api.github.com/repos/instana/nodejs-sensor/git/commits{/sha}","comments_url":"https://api.github.com/repos/instana/nodejs-sensor/comments{/number}","issue_comment_url":"https://api.github.com/repos/instana/nodejs-sensor/issues/comments{/number}","contents_url":"https://api.github.com/repos/instana/nodejs-sensor/contents/{+path}","compare_url":"https://api.github.com/repos/instana/nodejs-sensor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/instana/nodejs-sensor/merges","archive_url":"https://api.github.com/repos/instana/nodejs-sensor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/instana/nodejs-sensor/downloads","issues_url":"https://api.github.com/repos/instana/nodejs-sensor/issues{/number}","pulls_url":"https://api.github.com/repos/instana/nodejs-sensor/pulls{/number}","milestones_url":"https://api.github.com/repos/instana/nodejs-sensor/milestones{/number}","notifications_url":"https://api.github.com/repos/instana/nodejs-sensor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/instana/nodejs-sensor/labels{/name}","releases_url":"https://api.github.com/repos/instana/nodejs-sensor/releases{/id}","deployments_url":"https://api.github.com/repos/instana/nodejs-sensor/deployments","created_at":"2015-12-04T12:38:55Z","updated_at":"2018-09-07T08:42:00Z","pushed_at":"2018-09-07T10:27:33Z","git_url":"git://github.com/instana/nodejs-sensor.git","ssh_url":"git@github.com:instana/nodejs-sensor.git","clone_url":"https://github.com/instana/nodejs-sensor.git","svn_url":"https://github.com/instana/nodejs-sensor","homepage":null,"size":773,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":13,"open_issues":5,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/instana/nodejs-sensor/pulls/78"},"html":{"href":"https://github.com/instana/nodejs-sensor/pull/78"},"issue":{"href":"https://api.github.com/repos/instana/nodejs-sensor/issues/78"},"comments":{"href":"https://api.github.com/repos/instana/nodejs-sensor/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/instana/nodejs-sensor/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/instana/nodejs-sensor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/instana/nodejs-sensor/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/instana/nodejs-sensor/statuses/4f217b5ec0ed7c7d1d3e46819361e9382ebc4667"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"basti1302"}}