Skip to content

Commit 09852da

Browse files
committed
change atlas client
1 parent 9549eb2 commit 09852da

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

receiver/mongodbatlasreceiver/internal/mongodb_atlas_client.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,14 @@ func NewMongoDBAtlasClient(
145145
baseURL = "https://cloud.mongodb.com"
146146
}
147147

148-
log.Debug("Creating MongoDB Atlas client",
149-
zap.String("baseURL", baseURL),
150-
zap.String("publicKey", publicKey),
151-
zap.String("privateKey", privateKey))
148+
log.Info("Creating MongoDB Atlas client",
149+
zap.String("baseURL", baseURL))
150+
151+
client, err := mongodbatlas.New(tc,mongodbatlas.SetBaseURL(baseURL))
152+
if err != nil {
153+
log.Info("failed to create client", zap.Error(err))
154+
}
152155

153-
client := mongodbatlas.NewClient(tc)
154156

155157
return &MongoDBAtlasClient{
156158
log,

0 commit comments

Comments
 (0)