This is a migrated thread and some comments may be shown as answers.

Adding custom diagnostic data to email

5 Answers 69 Views
Diagnostics
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tim
Top achievements
Rank 1
Tim asked on 22 Apr 2012, 12:19 AM
Is there a way to add custom diagnostic data to the email sent by the RadDiagnostics class? I would really like to include whether or not the user is running a trial version of the application. I thought that RadDiagnostics.AddDebugInfo() would add data to the email, but it doesn't.

Example:
void radDiagnostics_ExceptionOccurred(object sender, ExceptionOccurredEventArgs e)
{
    RadDiagnostics.AddDebugInfo(string.Format("[AppIsTrial]:{0}", UserSettings.IsTrial));
}

5 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 23 Apr 2012, 02:21 PM
Hi,

Yes it is possible. Please see this help article:http://www.telerik.com/help/windows-phone/diagnostics-features-diagnosticdata.html

Kind regards,
Valentin.Stoychev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Tim
Top achievements
Rank 1
answered on 23 Apr 2012, 02:55 PM
Thanks for the link, but if you'll note my code sample, I've already found that posting. Am I doing something wrong? Am I misunderstanding how this works?
0
Accepted
Todor
Telerik team
answered on 23 Apr 2012, 03:48 PM
Hi Tim,

The DebugInfo can be used to add data during the normal application lifecycle, but not when the ExceptionOccurred event is fired because at this point the DebugInfo is already generated. If you want to add information in the event handler, you can use the CustomData in the ExceptionOccurredEventArgs:
void radDiagnostics_ExceptionOccurred(object sender, ExceptionOccurredEventArgs e)
{
    e.CustomData = string.Format("[AppIsTrial]:{0}", UserSettings.IsTrial);
}
 
The data will be included at the end of the email as Value for the "[**Custom Data**]" key.

if you have other questions, don't hesitate to write us back.

All the best, Todor
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Tim
Top achievements
Rank 1
answered on 23 Apr 2012, 04:10 PM
Excellent, thanks Todor. I will try that out.
0
Tim
Top achievements
Rank 1
answered on 24 Apr 2012, 10:02 PM
Thanks Todor. For others reference, it shows up at the very end like so:

[**Custom Data**]:[[AppIsTrial]:False]
Tags
Diagnostics
Asked by
Tim
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Tim
Top achievements
Rank 1
Todor
Telerik team
Share this question
or