question

Mathew F. avatar image
Mathew F. asked ·

Dynatrace Log4net log from MongoDB

We write log4net log to MongoDB and then use dynatrace. However, dynatrace is not showing the actual message. It is showing the message type. Does anyone know what might be the cause and also how does dynatrace know to map to which field in Mongo? Attached is the screen-shot and look at the message. Any help is appreciated.

settings.jpg

appmonconfigurationdashboardalertingagent7.0appmon 7business transactionadministrationservicesservercollectorclientweb dashboardadkapachecontinuous deliveryandroidsensorsappmonsaassplunk
settings.jpg (36.3 KiB)
settings.jpg (36.3 KiB)
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Joe H. avatar image
Joe H. answered ·

I wonder if the issue is that you're using Log4Mongo. I'm not familiar with it, perhaps it's just a subclassing of Log4NET classes, I don't know. But since our rules deal with log4net, and EventLogger, but not log4Mongo, then I'm not surprised that we're not catching log4Mongo activity correctly.

You could write your own rule to capture the logging strings from your calls to log4Mongo classes, but they wouldn't be treated as logging events, but more just as string captures. You'd still have the log string in context of the purepath, assuming the logging message is passed as a string and is capturable.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Mathew F. avatar image
Mathew F. answered ·

@Joseph M. H.Thank you for your response. We are currently using 6.5.0.1289 version it seems. We tried by commenting everything from log4net.config, but still the message in Dynatrace is showing message type as old one and nothing changed. We expected it to be blank. The log4net call is the standard format except that we store the log4net log in Mongo also. So we use log4net.dll as well as Log4Mongo dll. Does that matter? Any thoughts? Please let me know if you need more info


settings.jpg (36.3 KiB)
settings.jpg (36.3 KiB)
Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Joe H. avatar image
Joe H. answered ·

The log4net activity is captured from the Application layer, not from the underlying logging storage system, so Mongo has nothing to do with the situation.

I would suspect there's something non-standard about how you're writing messages, or AppMon has a bug. Perhaps you can specify a code example showing how you're calling Log4.net which might explain the behavior. Can you also specify what version of AppMon you're using?

Attached is a list of the logging infrastructure which is instrumented by AppMon to capture logging events from .NET applications.


Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.