I have correct profiling with SQL and regular steps and custom steps. However the system doesn’t seem to be logging MongoDB calls at all.
I call this method 5 times every page load.
public class SomeMongoSheet
{
public void DoMongo()
{
var client = new MongoClient("mongodb://XXX-XXX:12312");
var mongoServer = new ProfiledMongoServer(client.GetServer());
//mongoServer.Connect();
var db = mongoServer.GetDatabase("XXX");
var collection = db.GetCollection<SavedSearchCriteria>("SavedSearchCriteria");
Guid? id = Guid.Parse("6316e418-00f5-4dc0-bedf-935ddf4d53db");
var bsonId = BsonValue.Create(id);
var queryById = Query.EQ("_id", bsonId);
var x = collection.FindOne(queryById);
//mongoServer.Disconnect();
}
}
This is giving nothing in the output related to mongo. and “x” is filled in appropriately in debugging.
Anyone know what I did wrong?