>> Welcome back everyone
to the Xamarin Show. I'm your host, James Montemagno. And today, I have
a special guest all the way up
from San Francisco, which is where
everyone thinks I live. That's not true. I
live here in Seattle. Rest assured, it's how I
do all the Xamarin show. Sarah is with us from the App Center Team.
How's it going, Sarah? >> It's going well.
It's going well. >> I'm so excited to
have you because we've worked a long time in the past. We've been, I've seen
and ran into you, a lot of conferences and
a lot of different shows. And you weren't at Microsoft
and now you're back at Microsoft. So welcome. >> Thanks. Third time's
the charm. What can I say? >> But for today
we're going to be talking about monitoring
applications with App Center, which I'm super excited
about, because when I started monitoring
my applications a long time ago, it was a lot difficult. And now we've made it
really drop dead simple, so you're here to
show us the way. But maybe first, you could tell everyone a little
bit about yourself. >> Sure. Yeah, like I said,
third time's the charm. So the third time
returning to Microsoft. Originally, I lived up here
in Redmond for 10 years. I was on the Visual
Studio Team as a developer and then later I moved to CPM and I was the PM for Coplex
for several years. Then I moved down to
San Francisco Bay area, try some different things
here and there. More recently, I
was at GitHub for- Couldn't tell by
the laptop at all. >> For a couple of years. I worked on the
Microsoft side of things. The GitHub extension for
Visual Studio and then yeah. And I'm back and now this is my fourth week back in
the Visual Studio App Center. So yeah, I love DevTools.
I can't stay away. I got my master's degree
in User Experience, not because I wanted to do research or wanted
to do UX design. I just want to be
a better PM and making DevTools usable from
the dev perspective. Yes, so I'm really
happy to be able to get back to DevTools. >> That's awesome.
I've always thought about getting my master's but then I thought I've got to go back to school and
that's not going to happen. That's really smart.
That's awesome. I'm super happy to have you
here on the App Center Team. It's super exciting product. I know all of
our developers love it. So what really got you
excited about going and joining the team to work on crash reporting
and analytics? What was it about
that service specifically? >> Yeah so. So I'm PMing crashes
for App Center. Yeah, and I think
it just goes back to my my days when I worked on Visual Studio sitting there
in all the triage meetings, following bugs,
having to figure out, okay which crashes do you use. Do we fix? How do we figure out how they'll
reproduced this issue. What is the impact of it, so I could immediately feel empathy for
that user experience. But also in my nights and
weekends, I have some, currently have iOS apps
that I'm porting to or rewriting into Xamarin forms. >> Oh cool. >> Yeah, so I need to get
those up to the App Store. So, also as
a hobbyist who's like, okay, what can I do this very, very quickly but it
will give me a lot of information to improve my apps. So yeah, so that again goes back to like the Coplex days
of how do you take something where you have a product where
you have two sort of two different users,
two types of groups. And you have your
Enterprise customers, but you also have
like your hobbyist, your students, your people like me just coding on
the nights and weekends. So how can we raise. Like what's that quote, "Rising tide lifts all boats." Something like that.
But what can we do just to make software
better in the world. >> And it's always
a hard problem to solve, right? Because there's a lot of
solutions that like oh, it's really easy, just drag and drop this in and now you
have crash reporting. But all right, well, how do I learn how my users are
using my application? What can I do with that data? How do I do reporting? How do I get that to my manager? There's that scale that
you're talking about. There's like oh,
I'm just app dev, I'm going into the portal
every single day, I don't care. Then there's that
other part, now I'm in an enterprise and
I need to get it into some reporting tool. I need to get it out of App Center.and I need to kind
of have that migration flow. And I think it's what we've been able to do from what I've seen, and from what you showed
me of what you're going to show today which I'm
super excited about. >> Yeah I had a professor
in grad school who said, "Don't make the user
do homework." You should be able
to look at it and just know what you're
supposed to do. Like the affordances,
like the technical term, like you see a hammer, everyone knows how
to pick up a hammer. It should be just okay,
I know what to do next. That's like that's always for me personally what
I'm trying to get to. >> And from the developer
experience, you know, having crash reporting analytics just helps my app better, be better at the same time. Because I mean well, I do write pretty great code and I'm sure your write
amazing code too. Let's be honest,
no app is perfect, so it happens, crashes happen. I think that's
what we all have to admit to ourselves
at some point. >> And I am my own worst PM. It's like 15 years or
10 years of PMing just like shuts down in my inner dev
just goes wild like, I'm free to write
code and it's like all the best practices of every line just go
like out the window. So I need all the help I can get when I do my own
projects, so yeah. >> Cool. Let's get into it. >> Yeah, let's do this. >> Where do you
want to start at? >> So this app is,
it's ContosoAir, an app being called a
Contoso for a demo and it is basically a hotel
reservation sort of app. And here you can see, so we're here on
the Analytics Overview page. It's the kind of give
you a bird's eye view of what's the state of your app, like how many users do you
have, monthly, weekly, daily. You can sort by or
filter by versions. This one's just all time. You can see like just the past
week or longer time spans. But here you can see also, okay, how long are they
spending on the app. What is the average
session duration? So twenty minutes
depending upon your app. You know, 18 minutes could
be good, it could be bad. But yeah, it just depends
on the type of app. >> That's amazing. I
think the average length of time in an app
is like 20 seconds. >> Yeah, 18 minutes I'm looking
for a hotel reservation. What are they doing
in those 18 minutes? But anyway, hey, there
might be something for that later I can show you. But then the top devices, like okay what platforms
or devices are they using. So that can help you
figure out, okay, where do I need to
spend the time testing? >> Yeah, that's cool. Because
if all of a sudden you see a huge spike in iPhone X, you probably want to optimize your application for
the brand new iPhone, right? That's kind of something that I always think about is, well, how many of my users
are actually using the latest and greatest iOS
device or Android device or are they using
really low end devices and maybe I should worry about memory management a little
bit more I guess, right? >> And let's see, countries. Yeah, so do you need to work
on maybe a localization. Where do you want to,
perhaps localize your apps, any marketing campaigns,
things like that. These can give
you some insights. And then lastly
adoption, like hey, how many people are using
the latest version of your app. >> This is always
surprising to me. I always think that everyone automatically
updates and they do not. >> Right. And so yeah, for
those who do not, you can use push
notifications to say, hey, if you want some new features
or however you want to inform your users that there's a latest version,
you can do it that way. Because a lot of
time perhaps they just don't know or they haven't looked at
the app in a while. >> So this is kind
of like my main dashboard every single day, kind of monitor my application,
which is really nice. I mean, there's no real work. Like you didn't
have to customize, this is what just
came out of the box. >> Yeah, this just comes out
of the box, that's correct. >> It's really nice, yeah. >> And we mentioned the, like what's going
on those 18 minutes. If you go into
"Events" and these are custom Events and as you
will see app developer, you can write, like track
these Events at this time. So you write the line
of code to say, hey this is, it fired this event or captured
this event at a time. >> So overview, there's
no real code written besides some setup but this is stuff I can track additionally
if I want to. >> Yeah. >> Okay. >> And so, you see like how many people like,
looked at a room. And so here we could check the latest version and
see in past 30 days. So only 31 percent
of all users for this latest version have
been clicking See Room. But here you can get
some of those insights. And then there's
other information. You can also, if
this one had it, you can also in
that event Sunday, custom property and say like, how many rooms were they looking out at the time or
something like that. So you can send them
a little more information. >> Got it. Yeah,
you can check on additional information
onto that actual event. >> Yes. >> That's really
nice. So that way, often in my
applications I know I'm tracking like a state of
this page on this page, I filled in this thing and
this thing and then they hit this button but they forgot to do their password correctly
or it wasn't right length. So maybe you could add some additional metadata
basically. That's really cool. >> Yeah, so that's Analytics. And you might have noticed
this button at the top, above "View" and "Analytics" and "View" "Analytics" and
"Application Insights." So what does that
mean? So if your need more customization
to your graphs, if you need to do more
advanced querying, you can export it to
"Application Insights." >> Okay, right into
the Azure portal. >> Right. And here, I'm on the users page
and if I wanted to add, let's say, client_Model. So wait for it to grab a value. There you go. I mean people
are using the same phone as me and apply because why not. But yeah, this is the idea. You can get some more, so 221 users are
using an iPhone 6S. So, you just again getting
more insights into, if you need additional
information, you can go and export it to here then if we're provided
on the portal. >> That's nice. So that
way you're not actually trapped into App Center. A lot of times
people want to export their data and then bring it, not only into App Insights, but probably into Power BI. >> Exactly. >> Do charts and graphs
and things like that. And this also is
really pretty too. I love pretty charts and graphs. I don't know what it is, but I like when things
are done for me. That's really cool, actually. I didn't know about
this feature at all. So, how do you actually
go about setting that up? Is it just like a checkbox or? >> It's here in, we can look at the, and then the next, in the sample app
that I have. >> Set it up. >> Yeah, we can look
at it briefly but basically it would
be an export and you can choose where
to export it to. >> Okay cool. >> And yeah, so and then
let's look at crashes. >> So that is really like
when we're talking about monitoring apps
there's the two parts. For analytics, like how
well is our app doing. And then I guess crashes is
how bad is our app doing. >> Or how well, I mean the glass
could be half full. >> That is true. That's true. >> And this is what
you're specifically working on a day to day basis. >> Yes, this is.
My new day job is this. This is a great way
to start week four. Demo the feature. All right. So, here. We're looking at the crashes page for
this ContosoAir application. So, what's going on here? So this is, the first thing
on this page is like, okay, how many users
have been crash free? And that's pretty high. But I'm a perfectionist, I want to get that number
as high as possible. >> Yeah. >> And, we are playing
with the scaling over here. So, even though these
are hitting zero, they're actually not hitting
the bottom of the graph. It's not really zero, it's actually like 95 percent
because if we had from zero to 100, like, for
my personal apps, I think there's like three, all three users I have. Yeah, it would have to
be from zero to 100. But, if we kept that
it would just be like a straight line for something
with this high volume. So we're still tweaking it. So, again, hey, I'm on PM. I love feedback. I can never get too much of it, so I'm always looking for
ways we can improve this. But that's what this
is doing right now. Crashes per day? Okay, so if I wanted to see, you can see what's
happening on a daily basis. But you can also notice that
there is like the weekend, weekday curve going on
on those sites. Now, this bottom part is groups.
So, if we were to show, like, especially for
the larger apps, you know, like hundreds of
crashes individually for every unique user on
every unique device. I mean, it would just be,
it would just be a flood. >> Yeah, you can't
really as a developer, you can't quantitate
that into something. >> Exactly, how do we, again it's about making it actionable. You should be able to see
a hammer and just know, okay, this is how I pick it up. And so, one of the ways is the idea of the concept
of a crash group. Like, how do we group
similar crashes together. And, one of the ways
is to look at the stack frame, and say okay, these crashes if they
have the same stack frame, then they're most likely
caused by the same reason. >> Okay. That makes sense. So, you're
essentially diagnosing not only the type of crash but also where kind of in the code or based on the symbols
where it's occurring. Because, you could have
a null reference exception in 8,000 places, but you should have
8,000 different groups. >> Right. If you're
going to have to fix it, 8,000 different places then yes. >> There literally
are different crashes. That's why we're seeing inside of here kind of similar things, similar system IO exceptions but they're in different places. >> Right. Yeah, and so. Yeah. Again, It's like, how do I make this actionable. Tell me what I need to do. So, I can do my day job and
then go on to the next thing, like, I want to
fix these crashes. I want to get the biggest
bang for the buck. And so, if you sort by impact, what it says is
it says "How many crashes have occurred
per crash group?" So, there were 94 occurrences of this crash for this crash group, and that's across 76 users. >> Impacting basically
all of our users. >> At least 76 users.
>> A lot of users. >> Yes, 76 users
encountered this crash. And this crash
happened 94 times. And there were
probably several users, say, hit it multiple
times for whatever reason. So, let's go look into it. And so, we're looking
at the representative. So, in theory these should
all be the same again. Yeah. Week four. But yeah, these should be
all the same call stack. So, we are looking at
the call stack here. This goes from three to nine. And if you can expand, it's kind of like
seeing the additional system level code
that I didn't write. But again, it's like show
me what I can control. >> What I care about, yeah. >> And, yeah. And so,
here we can see again crashes per day for
this particular crash group, most affected devices,
operating systems. But that, say again, I
need just one specific, one to I can like
start to look at. >> Dive into, yeah. >> Yeah. So, we're
gonna look at this one, a more recent platform, our operating system,
and here I can see more about
this particular device. And the threads that
are also occurring at the same time, Events. And remember like you
saw earlier about in the analytics for
say app developer, I can do custom event tracking. >> So it's kind of
like what happened, what I tracked leading
up to the crash? >> Yes, exactly. >> So it almost gives me the steps to
reproduce it myself. >> Yes, exactly. >> Nice, that's cool. >> And then attachments. This one doesn't have
attachments but in another demo in a bit I'll show you how you
can do attachments. So with attachments, you can
send additional information. >> Oh, that's really nice. Yeah, kind of like, especially, a lot of applications
that I may solve by my own logging type framework. >> Yeah. >> So, you can pump that out
over here to the attachment. >> Yeah. >> That's cool. Yeah,
that's kind of really nice. I mean, this application, it really was impacting
every type of device but, even just going in to say, is it the same between this device and this device or leading up to the repro steps? Or what was actually
happening for me? Like, you said
actionable items of, hey I can go back to my setup
and I can just go and look at the code where I
put the snippets at and actually reproduce the bug, which I think is
the hardest part. Right. The hardest part is not knowing that a crash
is occurring. It's how do I now reproduce
that crash and fix it. >> Yes. Exactly. >> So, this gives me tons of information now. How
did you set this up? Is it like, there's
a lot of work? I mean, there's a lot of information that's
flowing into this. >> All right. So yeah.
Let's start with, so, this is a sample app that I started creating for this trip, from San Francisco to Seattle. I never know if I'm coming,
which way I'm going. But yeah, I find myself I
have a piece of paper at home, and it has everything
that I should bring. And so, it's like
my pre-flight checklist, and I go through it
just to make sure, okay, what did I forget? You know, hopefully I have
everything this time turned off like the heater
or AC when I leave. And I realized, wait a minute, there should really be an app that I can
just check, check, check, and then cleared
for the next trip. And then check, check, check again. And so, yeah. So this is actually
Xamarin Forms Apps. So, you could make sure that you select
Xamarin Forms for the instructions.
And, let's see. Yeah. And so, here you
just step one, step two. But it tells you exactly, Okay, which NuGet
packages to install. And, remember if you
use Xamarin Forms App, you have to do it
in both places. Not just for the
Xamarin Form project, but also for the targeted
platform projects as well. >> Got it. >> Yeah. And then,
using statements. And, this is the line
of code that you add. And for this particular example, you're about to see,
I'm just targeting iOS for the time being. In App Center, you register applications for each of
the platforms. >> Got it. >> This is an iOS registration
that you're seeing. And that's why you only see, you're only getting what
we called the App Secret, you're only getting this one. >> Got it. So if you
had an Android version, a UWP, you just add it in there. >> You would see
your iOS App Secret here, and then you would see
your Android App Secret. >> That's pretty nice. You
could just register them all at the same time,
in a shared code. You don't even have to go into the platform specific
besides the NuGet. >> Exactly. >> Very cool. >> And then. Yeah. And
that's pretty much it. And, it's really like you just do that,
and then you start. And then, just pay
attention to it. If you're in Xamarin Forms versus Xamarin iOS
or Xamarin Android just pay attention to
where you need to start. Yeah. I like where
to start the code. This one gets me every time,
I say, "Oh yeah where am I?" Okay. Yeah, in this place,
so put it here. So, just pay attention to that. >> Very cool. >> Yeah. Yeah, and control. There we go. All right. And yes, let's look at this in the, so again, control. There you go. All right. So, again NuGet packages
here and then also. >> Got it. >> And its targeted
and so this one, just starting on iOS. >> So any Xamarin developer will be used like
you've done, like, plugins for Xamarin,
where you have seen everything now and you just send the "done is" standard or PCL. Because the platform
specific implementation is what's in there. So, it's actually cool. >> And here is the line. Yes. And yes, like
I said I just did the one platform
registrations for iOS. So, that's why I just
have that one App Secret. And then, so yeah,
typeof(Analytics) just to get all those analytics on
that one page that you saw. >> Okay. >> And then it crashes as well. >> Got it. So, how
would I go about doing additional things
like tracking Events or get this other advanced
functionality that you are talking about. >> So, let's jump over to, I just have like,
let's start here. Someone who is helping me get
ramped up in Xamarin Forms, they said always start with the app code to see
exactly what is happening. And, it was like, yup. So, you see that I created
a pre-flight checklist page. And over here, we
jump to that page. You'll see I have
a button and this is the click event for
the button. And, yeah. So, if you want to start
tracking analytics like, hey are they
clicking this button? For my own personal apps,
I was thinking, well are they ever clicking the question mark
like more information? >> Yeah. >> It's like, oh wait. Again my inner dove
goes free and my PM, 10 years just goes
out the window. I'm like, oh yeah,
of course, I should be tracking all this stuff. So, this is how
to track an event. You just send us,
send this line, and then you will get on
that custom event page that you saw like the C-room. >> Got it. That was perfect. > Yeah. And then here I did
two different exceptions. I did, not implement
the exception. And then, just through
like a generic exception. This I wanted to show
two different call stacks. >> Got it. Yes. Basically, this probably wouldn't be a real code
but to simulate a crash. >> Yeah, like I said.
I'm just getting started with this app. So, yeah. I wanted to show
two different call stacks, it would have two
different crash groups. >> Perfect. >> And here, yeah, so we could jump over to, yeah. I'll just show really
quickly just show, yeah, you can see here. >> Okay. So, you have
the two different track. >> Yeah, I had like,
a main page loaded on my personal device and then also in the simulator. And again, it just like, the fact that I can
test all this on the simulator was
exciting to me. I just assumed that I would have to be doing
this on the device. >> Got it. Yeah. >> So, I was
excited to see that. So, I can test all my, like, play with all my
hypothesis in my head. Am I getting the analytics
that I'm expecting? So I can make
informed decisions. >> Got it, makes sense. >> All right. And then,
therefore crashes. So, here we can see. So happy you sought me about the control to finger scroll. >> Yeah, front moves. >> Yeah. >> So here, you can see
a system exception and a system not implemented,
exception thrown here. There's two different call,
two different groups and yes. So, what, oh yeah. So let's go in here,
and I'm going to go to this particular
like one specific one. >> Yes. I see you can
actually see not only, the little event
that happened in, but you can also see a message. So if you give really nice
messages in your exceptions, or if you rethrow an exception. I mean, it's pretty great. You're going to know
what to search for. Right? That's for sure. >> Yeah. Yeah. >> Really cool. >> Yeah. Normally
my searches from the 90s, Yo! MTV Raps. Because you never,
that's a unique string. I know I can find it because if it exists I will
be able to find it. Anyway, so yeah,
If I wanted to see those Events if I can, it's OK. If I'm sitting there 10 years, 15 years ago as a developer
on Visual Studio I'm like, OK how does this user get
into this state with IDE. This gives me a fighting
chance of saying, OK, what were the Events leading up to right before the crash. So I can try to reproduce it on my own as
much as possible. And so here you are getting started clicked and
then the app crashed. So, yup. Oh yeah. And then, some attachments, you can send the screenshot. This is just the, its a dummy
text that I'm playing with, but again, you can
learn more about them. Let me show you, let me
show everyone where you can learn more about the SDK. In the Visual Studio App
Center documentation, go to the SDK, "Crashes", and then
depending upon your platform, for example this is targeting, all right here, "Xamarin". >> "Xamarin". Yeah. >> Yeah. You can see. >> Every little. >> Yeah. You can then find
details about the last crash. As well as attachments. So this is where
I got that code. >> Yeah. Yeah. So
this is where, this is essentially where
you put that code, when you want it to
generate for that crash. That's really nice.
That's really cool. Yes, it seems there's
an Events for almost every single thing
that happened, so you kind of have
that fine grained control over the crash reporting. So you can add that
additional meta data to help you finesse your app. That's really cool.
Awesome. Anything else you want to show off
inside of App Center? Or. >> Let's see, so we should, because what is the point of, like if you're
going to do a demo you've got to commit to it. So 15 crashes right
now. So let's run this. Yeah. And yeah. So, yeah. So, oh yeah. I
wanted to do this. I do this every
time. And that's why I wanted to demo this. If you're trying
to test crashes, you can't be under the debugger, because the debugger
won't handle the crash, and so the crash
won't get recorded. So, what you need to do is
once you run all the ports of the device make sure that
you're not under the debugger. Start your app, and now
we're going to crash the app. And now, on the next run, that's when it will
send it's data. >> Yeah. We were talking
about that because, I asked you
specifically, when does the crash get reported? And you had the perfect
answer for that. >> Yeah. Because you've crashed. I hope that's what I said. Yeah. Yeah. So now. >> So the next boot up is when it's going to
go ahead and send it over. >> Right. The next time
that it is launched, and if we have
killed enough time, it should be pretty,
it is pretty fast. Write it out. And the local demo gods
smiled upon us today. And this has increased to 16. And we say that, yeah, 34 seconds ago. >> Wow. That's
really nice and its super quick. That's awesome. Now is there
any other integrations with other like I use, sometimes my source code
is in GitHub or in VSTS, is there any additional like tracking or synchronization
between other tools? >> Oh yeah. So here
for this project, I have it setup that every time there's a new crash group, that an issue will
be filed in GitHub. And so this is even
in the private repo. >> Oh nice. >> So I could again just enforce it to be a
new go big or go home. All right. Let's call this. Richard,
give me an exception. >> Just do it like a null
reference exception maybe. >> All right. You got
to remind me, it's just null reference. Yeah. Forgot. You know
what, something like that. All right. It is my test string. Can you tell I used to
be a tester? All right. And then here, stick
to what I know, I'll stop the debugger
and then relaunch. >> The run without debugging in Visual Studio
from Mac is somewhere. >> Well I mean, it's taken me a while to go from
Visual Studio on Windows for my entire career. >> I did the exact same thing
after six years. >> I'm terrified of
my old keyboard shortcuts, too much old habit here. >> So now we're going to see is a new crash group of
null reference exceptions. >> Yes. >> On next launch. >> And it should get me a new GitHub issue because
I set it up that way. All right. And I can't remember, I think I crashed it. All right. Let's
just send a couple. That would be six, I'm sorry. One more time. All right. And OK, let's go back here. So we're going to have
to wait a little bit. So, what is the coolest thing
you've seen this week? Or this year? >> Oh my goodness. This year
2018 kicking it off, wow, I mean CES just happened. And while I'm not really excited for all of new televisions, maybe, I don't know. I guess I'm excited
for the stuff happening with like
the Nintendo Switch currently, this new lab of
thing where it's like cardboard creations, I don't
know, that's what I'm about. I'm a weirdo, but I love it. I'm a big video game geek. I love it. So, so hopefully we'll see a bunch because we crashed it a whole
bunch of time. >> Should be above 16, should be 18. Yeah, 18. >> OK. Cool. >> And since this is null reference exception
we have a new crash group. I do not know how long it takes, I thought it was pretty
instant yesterday when I was looking into
this. But yeah, there we go. >> Oh cool. >> So yeah. >> What happens when you click on that one?
Open null reference. Yeah. >> Opening in
a minute. OK. Yeah. >> Oh that's really nice.
So, as a developer who may not even have
access to App Center, and I'm just inside the GitHub
or VSTS or somewhere else, I just have all the
information at hand. >> And if you I believe, yeah, that if you resolve this issue, you close it, it
should be closed also. >> Wow. >> Also, that should
be, its a weak sync. >> That's super nice. So
really actionable items, not only inside of App Center for your app, but
inside of GitHub too. >> Yes. >> Awesome. Cool. Is there anything else? >> No. That's. >> Every little bit.
There's a lot more. >> This is where I have
onboarded in three weeks. So. >> Awesome. Well Sarah, thank you so much for
making the trip up from beautiful San Francisco
to beautiful Seattle, Washington, where it's bright and sunshiny every
single day of the year. >> All the time. All the time. >> All the time. Well awesome,
until next time this has been another episode
of The Xamarin Show. Make sure you subscribe, it's up over there, down over
there, you know what to do, ding that bell so you get notifications
right in your inbox or notification streams. Until next time,
thanks for watching.