Skip to content

Commit d0f819d

Browse files
authored
chore: expand new connection telemetry details MONGOSH-860 (#981)
1 parent 22e3a47 commit d0f819d

File tree

5 files changed

+11
-19
lines changed

5 files changed

+11
-19
lines changed

packages/service-provider-core/package-lock.json

Lines changed: 3 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/service-provider-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@mongosh/i18n": "0.0.0-dev.0",
3232
"bson": "^4.4.0",
3333
"mongodb": "4.0.0-beta.5",
34-
"mongodb-build-info": "^1.1.1",
34+
"mongodb-build-info": "^1.2.0",
3535
"mongodb-connection-string-url": "^1.0.0"
3636
},
3737
"optionalDependencies": {

packages/service-provider-core/src/connect-info.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ describe('getConnectInfo', function() {
8282
const output = {
8383
is_atlas: true,
8484
is_localhost: false,
85+
is_do: false,
8586
server_version: '3.2.0-rc2',
8687
mongosh_version: '0.0.6',
8788
is_enterprise: true,
@@ -109,6 +110,7 @@ describe('getConnectInfo', function() {
109110
const output = {
110111
is_atlas: true,
111112
is_localhost: false,
113+
is_do: false,
112114
server_version: '3.2.0-rc2',
113115
mongosh_version: '0.0.6',
114116
is_enterprise: true,
@@ -136,6 +138,7 @@ describe('getConnectInfo', function() {
136138
const output = {
137139
is_atlas: false,
138140
is_localhost: false,
141+
is_do: false,
139142
server_version: '3.2.0-rc2',
140143
mongosh_version: '0.0.6',
141144
is_enterprise: true,
@@ -163,6 +166,7 @@ describe('getConnectInfo', function() {
163166
const output = {
164167
is_atlas: false,
165168
is_localhost: false,
169+
is_do: false,
166170
server_version: undefined,
167171
mongosh_version: '0.0.6',
168172
is_enterprise: false,

packages/service-provider-core/src/connect-info.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import getBuildInfo from 'mongodb-build-info';
66
export interface ConnectInfo {
77
is_atlas: boolean;
88
is_localhost: boolean;
9+
is_do: boolean;
910
server_version: string;
1011
mongosh_version: string;
1112
server_os?: string;
@@ -38,6 +39,7 @@ export default function getConnectInfo(uri: string, mongoshVersion: string, buil
3839
return {
3940
is_atlas: !!atlasVersion?.atlasVersion || getBuildInfo.isAtlas(uri),
4041
is_localhost: getBuildInfo.isLocalhost(uri),
42+
is_do: getBuildInfo.isDigitalOcean(uri),
4143
server_version: buildInfo.version,
4244
node_version: process.version,
4345
mongosh_version: mongoshVersion,

packages/types/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export interface ShowEvent {
3434
export interface ConnectEvent {
3535
is_atlas: boolean;
3636
is_localhost: boolean;
37+
is_do: boolean;
3738
server_version: string;
3839
server_os?: string;
3940
server_arch?: string;

0 commit comments

Comments
 (0)