How to Create Custom Events, Metrics, Traces in Azure Application Insights using C#

In our previous post, we created a Web API app running in Azure with Application Insights enabled. In this post, we will show how to write custom events to App Insights using C#. We will use the same Web API code we installed in the previous post. Open the project in Visual Studio and install the Microsoft.ApplicationInsights NuGet package: Click OK: Now the code. Let’s add an Event, a Metric … Continue reading How to Create Custom Events, Metrics, Traces in Azure Application Insights using C#

How to Create a Web API App using ASP.NET Core with App Insights

In this post, we will look at how to create an ASP.NET Core Web Application and host it in Azure with Application Insights. First, let’s open Visual Studio and create a new ASP.NET Core Web Application project: Give the project a name: And select API as the type: We see the project in VS below: Press F5 to run the app. Click Yes if you see the message below: And click … Continue reading How to Create a Web API App using ASP.NET Core with App Insights

How to Use Application Insights (App Insights) with APIM

In our previous post, we showed how to setup and use API Management (APIM) in the Microsoft Azure Portal. Now that APIM is set up, let’s add Application Insights to monitor the usage of these APIs. Application Insights, or App Insights, or an Azure service that can be used to provide detailed monitoring and reporting of your application. Let’s set it up with our test APIM app. Log into https://portal.azure.com/ and search … Continue reading How to Use Application Insights (App Insights) with APIM

How to Setup and Use API Management (APIM) in Microsoft Azure Portal

In Azure, the API Management service helps organizations manage APIs. In this post, we will look at how this works. Let’s follow the example at https://docs.microsoft.com/en-us/azure/api-management/import-and-publish. We will manage a sample API located at https://conferenceapi.azurewebsites.net/?format=json which looks like below: Log into Azure Portal at https://portal.azure.com and search for API Management and select API Management Services: You will see below. Click Add: You will see: Enter a Name, Resource Group etc and click Create: … Continue reading How to Setup and Use API Management (APIM) in Microsoft Azure Portal

How to Use Azure Notebooks Hello World

Azure Notebooks are Jupyter notebooks running on Azure, which is great as users don’t need to install any software locally, and it comes with other cool features as well. To access Notebooks, go to https://notebooks.azure.com/ and sign in: You will be prompted to create a user id. Enter one and click Save: You will see below: Let’s click on Create a New Project, called Hello World. Note the option to make this … Continue reading How to Use Azure Notebooks Hello World

Updating Swagger in an Azure API Management Service

In this post, we will look at how to update Swagger in an Azure API Management service. Let’s continue from this previous example, where we created an Azure App Service. Our Swagger for this app service looks like this: If we go to our APIM in Azure, let’s add in this code. Click on swagger.json: We see the JSON. Get the URL: Paste it into the APIM Open Specification: We see … Continue reading Updating Swagger in an Azure API Management Service

How to Secure an Azure App Service with Azure AD Authentication

In this post, we will look at how to secure an Azure App Service with authentication by using Azure Active Directory. Go to https://portal.azure.com and select an App Service. We will use one we created earlier. Select Authentication / Authorization: Set App Service Authentication to On: Select Azure Active Directory. Note the other options – Facebook, Google, Twitter etc: We see: Let’s use Express setup. We will call our app CarlCRMAPIADApp: … Continue reading How to Secure an Azure App Service with Azure AD Authentication

Adding App Insights to an Azure App Service

In this post, we will look at how to add Azure App Insights into an App Service. Log into the Azure portal at https://portal.azure.com/ and select your App Service, then go to the Application Insights menu option. Click Turn on Application Insights: We see “Your app will be connected to an auto-created Application Insights resource: CarlCRMAPI Instrumentation key will be added to App Settings. This will overwrite any instrumentation key value in … Continue reading Adding App Insights to an Azure App Service

Using the Developer Portal (Legacy) in Azure API Management

In this post, we will look at the Developer Portal (Legacy) for Azure API Management. Browse to your APIM in Azure and click on the link: On selecting this, we get to a developer portal: We see our APIs. Select one: We see our operations. Select one and click Try It: We can select a Subscription Key and click Send to send a request: We get a 200 Response back. … Continue reading Using the Developer Portal (Legacy) in Azure API Management