Azure Archives - Page 8 of 11 - - Page 8

Category Archives: Azure

Getting started with Git Service in Azure DevOps

GitHub is a platform that is used by developers to work together on the same program at the same time. The underlying program is called Git and it keeps track of different versions and by giving support for merging conflicting modifications by different people. GitHub is an online hosting platform of code that you share through Git. Git is a command-line tool, GitHub adds an excellent web platform to share between developers and it also gives you an external backup of your code. Azure DevOps provides Git service that you need to complement your existing workflows. In order to getting started with Git go to below link and click on getting started with Git https://azure.microsoft.com/en-us/services/devops/ Click on new Project and select visibility to private Clone the local repo on DevOps once we set the repo we can then clone it to Visual Studio or any other IDE. We can see the different projects gets uploaded on DevOps Git repo service as shown below. The basic operations Below are the most basic commands/operations for Git that will allow you to get started easily: Clone: “downloading” an existing folder (called repository) of code on GitHub to your local computer so that you can work on it Commit: when you have made changes in your code repository, you must commit it before you can upload it to GitHub Push: when you have committed your changes, you then push them so that they get registered on GitHub and so that potential collaborators can see them Pull: when someone else is working on the same code and they have pushed their changes, your code is not the newest version anymore. To receive the newest version, you should do a pull

Share Story :

Application Insights for Server less Computing

Posted On January 4, 2021 by Yogesh Gore Posted in

Application insights is cloud service is use to monitor Azure Cloud Service App for availability, performance, failures, and usage by combining data from Application Insights SDKs with Azure Diagnostics data from your cloud services. Application Insights collects log, performance, and error data, and automatically detects performance anomalies. Application Insights includes powerful analytics tools to help you diagnose issues and to understand how your functions are used. When you have the visibility into your application data, you can continuously improve performance and usability. You can even use Application Insights during local function app project development. How to create Application insights resource workspace? Search for Application Insights in Azure and click on create. Select the required configurations as shown below and click on next. Add the Tags. Review and Click on Create. Integration of Application Insights with Azure Function Application insights can quickly be hooked up an Azure Function App. You create an instance of Application Insights, obtain the instrumentation key and set in the application settings. Note that when deploying a function to a Function App the Application Insights is enabled and you do not have to do anything. Once this setting has been saved the Function App automatically will send information to Application Insights, without any code changes. If you open Application Insights instance and click “Live Metrics” you will see a near-live view of what is coming from your Function App. In the file host.json, for the filed “Function”, set its value to Trace. Then LogTrace() can be logged into application insights. Sample host.json for Azure function v2, which can log trace messages to Application Insights: {   “version”: “2.0”,   “logging”: {     “fileLoggingMode”: “always”,     “logLevel”: {       “default”: “Information”,       “Host.Results”: “Error”,       “Function”: “Trace”,       “Host.Aggregator”: “Trace”     }   } } And if you publish your function app with visual studio, you can modify your host.json file as per the above before publishing. And if you want to change the log level in azure portal, please follow this: In Azure portal, navigate to your function app -> in the function app settings, make sure enable the Read/Write, then change log level to trace in the host.json. Log levels and categories When you write traces from your application code, you should assign a log level to the traces. Log levels provide a way for you to limit the amount of data that is collected from your traces. LOG LEVELS AND CATEGORIES LogLevel Code Description Trace 0 Logs that contain the most detailed messages. These messages may contain sensitive application data. These messages are disabled by default and should never be enabled in a production environment. Debug 1 Logs that are used for interactive investigation during development. These logs should primarily contain information useful for debugging and have no long-term value. Information 2 Logs that track the general flow of the application. These logs should have long-term value. Warning 3 Logs that highlight an abnormal or unexpected event in the application flow, but don’t otherwise cause the application execution to stop. Error 4 Logs that highlight when the current flow of execution is stopped because of a failure. These errors should indicate a failure in the current activity, not an application-wide failure. Critical 5 Logs that describe an unrecoverable application or system crash, or a catastrophic failure that requires immediate attention. None 6 Disables logging for the specified category. A log level is assigned to every log. The value is an integer that indicates relative importance: Logging in Azure function In your function code, you can write output to logs that appear as traces in Application Insights. The recommended way to write to the logs is to include a parameter of type ILogger and we can trace it using log object of ILogger class for older version of azure function we can use TraceWriter. Following code writes log to application insights public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, ILogger logger) {     logger.LogInformation(“Request for item with key={itemKey}.”, id); }

Share Story :

Azure Synapse Analytics – Part 2 – How to create a dedicated SQL pool and connect via SSMS

Posted On December 21, 2020 by Sandip Patel Posted in

This is the second part of a blog, where we will learn how to create a dedicated SQL pool step by step and also see how to connect server via SSMS. Create a dedicated SQL pool: Step 1: Once your Azure Synapse workspace is ready, click on New dedicated SQL pool. Step 2: Create a dedicated SQL pool with your preferred configuration. Step 3: Customize additional configuration parameters including collation & data source. Step 4: Click on Review + create a tab to check the details. Once you click on the create button it will take few minutes to create a resource. Step 5: Click on show database connection strings to know the server name, user id, and password that will help us to connect server. Step 6: Open SQL server management studio (SSMS) to establish a connection to your server. Step 7: Select Connect. The object explorer window opens in SSMS. Step 8: In Object Explorer, expand Databases. Then expand mysqlpooltest to view the objects in your new database. Hope this will help.

Share Story :

Azure Synapse Analytics – Part 1 – How do you create an Azure Synapse workspace?

Posted On December 21, 2020 by Sandip Patel Posted in

In this blog, we will learn how to create an Azure Synapse workspace step by step. Below we will dive into these topics Overview of Azure Synapse Analytics Create an Azure Synapse workspace Overview of Azure Synapse Analytics: Azure Synapse is an integrated analytics service that accelerates time to insight across data warehouses and big data systems. Azure Synapse brings together the best of SQL technologies used in enterprise data warehousing, Spark technologies used for big data, and Pipelines for data integration and ETL/ELT.  Azure Synapse Analytics is an evolution of Azure SQL Data Warehouse. Azure SQL Data Warehouse was a massively parallel processing (MPP) cloud-based, scale-out, relational database, designed to process and store large volumes of data within the Microsoft Azure cloud platform. At its core, Azure Synapse contains the MPP, scale-out technology of Azure SQL Data Warehouse (referred to as Synapse SQL pool). However, Microsoft has added a few other features that make this a more powerful and unique data analytics solution in the market.  Azure Synapse Analytics goes beyond enabling cost-effective data management and analytics by leveraging the power and scale of the cloud: Azure Synapse will break down silos that exist today because of teams, data, and skills, and enables insights for all by integrating with Power BI and Azure Machine Learning and AI. Create an Azure Synapse workspace: Step 1: To create an Azure Synapse workspace, sign in to the Azure portal. In the upper-left corner of the home page, select Create a resource. In the Search the Marketplace box, enter Application insights and select and press enter Step 2: Select Azure Synpase Analytics from the search result and click on the create button. Step 3: Click on the create button and enter the following information Subscription Resource group Workspace name Region Details about your storage account Step 4: Configure the security options of your workspace. Step 5: Check the summary tab before click on the create button. Once you click on the create button it will take 4 to 5 minutes to create a resource. Hope this will help.

Share Story :

Application Insights – Monitoring Azure Function App

Posted On December 8, 2020 by Sandip Patel Posted in

In this blog we will learn how to monitor Azure function app using application insights. Below we will dive into these topics Overview of Application Insights Create Application Insights Configure Application Insights into Azure function app Viewing Application Insights Azure Application Insights: Azure Application Insights is an extensible Application Performance Management (APM) service. Used to monitor live web application. It will automatically detect performance anomalies. It includes powerful analytics tools to help diagnose issues and to understand what users do with the app. It’s designed to help continuously improve performance and usability. It works for apps on a wide variety of platforms including .NET, Node.js and Java EE, hosted on-premises, hybrid, or any public cloud. It integrates with your DevOps process, and has connection points to a variety of development tools. It provides benefits as: Exceptions and performance diagnostics. Interactive data analysis. Azure diagnostics. Proactive detection. Create Application Insights: Step 1: To create a new Application insight, sign into the Azure portal. In the upper-left corner of the home page, select Create a resource. In the Search the Marketplace box, enter Application insights and select and press enter. Step 2: Select Application Insights from the search results, and then select Create. Step 3: Click on create button and enter required information and also configure log analytics workspace. Step 4: Once you click on Create button, your application insights is ready to use. Configure Application Insights into Azure function app: Step 1: To create a new Function app, sign into the Azure portal. In the upper-left corner of the home page, select Create a resource. In the Search the Marketplace box, enter Function app and select and press enter Step 2: Select Function app from the search results, and then select Create. Step 3: Click on create button and enter basic required information as per below screenshot. Step 4: Click on Monitoring tab and enable Application insights that you have created previously. Step 5: Click on Create button, your function app is ready to use. Step 6: Click on left navigation pane, select settings >> Application insights. Create a Azure Function App via VS 2019: The Azure Functions project template in Visual Studio creates a project that you can publish to a function app in Azure. From the Visual Studio menu, select File > New > Project. In Create a new project, enter functions in the search box, choose the Azure Functions template, and then select Next. In Configure your new project, enter a Project name for your project, and then select Create. The function app name must be valid as a C# namespace, so don’t use underscores, hyphens, or any other nonalphanumeric characters. 4. Select Create to create the function project and HTTP trigger function. C# code : 5. Publish this function app on azure portal, as per below screenshot. Viewing Application Insights: Step 1: Select function app that you have publish and click on function app test run as per below screenshot and also open app insights on other tab to view the logs. Step 2: App insights result gave the information that you have logged in your function app. Hope this will help.

Share Story :

How to connect Azure App configuration using connection string with C# .NET core – Part 1

Posted On November 28, 2020 by Sandip Patel Posted in

In this blog we will learn how to connect Azure app configuration via connection string with C# .NET core. Below we will dive into these topics What is Azure App Configuration Create an App Configuration store Create a function app Connect to an App configuration store Azure App Configuration: Azure App Configuration is a managed service that helps developers centralize their application configuration and feature settings simply and securely. Use Azure App Configuration to store and secure configuration settings for your application in a single location. App configuration offer the following benefits. A fully managed service that can be set up in minutes Flexible key representations and mappings Tagging with labels Point-in-time replay of settings Dedicated UI for feature flag management Create an Azure App Configuration: Step 1: To create a new App Configuration store, sign into the Azure portal. In the upper-left corner of the home page, select Create a resource. In the Search the Marketplace box, enter App Configuration and select and press enter Step 2: Select App Configuration from the search results, and then select Create. Step 3: Click on create button and enter required information. Step 4: Once your app configuration is created, select “configuration explorer” in the left navigation and click on create button to add a new entry. I’m going to add a couple of example entries, all with the same key “AzfApp:Description”, but with different values and Labels. Step 5: Select “Access Keys” in the left navigation pane and copy connection string and paste it into notepad++ later this will used in function app to read the value from app configuration. Create a Azure Function App: The Azure Functions project template in Visual Studio creates a project that you can publish to a function app in Azure. From the Visual Studio menu, select File > New > Project. In Create a new project, enter functions in the search box, choose the Azure Functions template, and then select Next. In Configure your new project, enter a Project name for your project, and then select Create. The function app name must be valid as a C# namespace, so don’t use underscores, hyphens, or any other nonalphanumeric characters. Select Create to create the function project and HTTP trigger function. Connect to App configuration store: Right-click your project, and select Manage NuGet Packages. On the Browse tab, search for and add the Microsoft.Extensions.Configuration.AzureAppConfiguration NuGet package to your project. Open Function1.cs, and add the namespaces of the .NET Core configuration and the App Configuration configuration provider. C# code : using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration.AzureAppConfiguration; Add below code to read the app configuration value using connection string. Press F5 to test your function. If prompted, accept the request from Visual Studio to download and install Azure Functions Core (CLI) tools.  Copy the URL of your function from the Azure Functions runtime output. 6. Paste the URL for the HTTP request into your browser’s address bar. The following image shows the response in the browser to the local GET request returned by the function. Hope this will help.

Share Story :

How to connect Azure App configuration using Managed Identity with C# .NET core – Part 2

Posted On November 28, 2020 by Sandip Patel Posted in

In this blog we will learn how to connect Azure app configuration via Managed Identity with C# .NET core. Below, we will dive into these topics What is Azure App Configuration Create an App Configuration store Create a function app Connect to an App configuration store Azure App Configuration: Azure App Configuration is a managed service that helps developers centralize their application configuration and feature settings simply and securely. Use Azure App Configuration to store and secure configuration settings for your application in a single location. App configuration offer the following benefits. A fully managed service that can be set up in minutes Flexible key representations and mappings Tagging with labels Point-in-time replay of settings Dedicated UI for feature flag management Create an Azure App Configuration: Step 1: To create a new App Configuration store, sign into the Azure portal. In the upper-left corner of the home page, select Create a resource. In the Search the Marketplace box, enter App Configuration and select and press enter Step 2: Select App Configuration from the search results, and then select Create. Step 3: Click on create button and enter required information. Step 4: Once your app configuration is created, select “configuration explorer” in the left navigation and click on create button to add a new entry. I’m going to add a couple of example entries, all with the same key “AzfApp:Description”, but with different values and Labels. Step 5: Select “Access Keys” in the left navigation pane and copy endpoint and paste it into notepad++ later this will used in function app to read the value from app configuration. Create a Azure Function App: The Azure Functions project template in Visual Studio creates a project that you can publish to a function app in Azure. From the Visual Studio menu, select File > New > Project. In Create a new project, enter functions in the search box, choose the Azure Functions template, and then select Next. In Configure your new project, enter a Project name for your project, and then select Create. The function app name must be valid as a C# namespace, so don’t use underscores, hyphens, or any other nonalphanumeric characters. Select Create to create the function project and HTTP trigger function. Connect to App configuration store: Right-click your project, and select Manage NuGet Packages. On the Browse tab, search for and add the Microsoft.Extensions.Configuration.AzureAppConfiguration NuGet package to your project and also add Azure.Identity package to your project. Open Azf_Final_Test_MgmtIdentity.cs, and add the namespaces of the .NET Core configuration and the App Configuration configuration provider. C# code: using Azure.Identity; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration.AzureAppConfiguration; Add below code to read the app configuration value using managed identity. Now build the project if build successful then right click the project and publish in Azure portal.  Navigate in the Azure portal to your azure function app that you have just published, select “Identity” from the let navigation pane and click on enable that you want to use. Once you’ve got your identity enabled, make a note of the name (the same name as your app service), which you’ll need in the next step. From your App Configuration service, select “Access control (IAM)” from left navigation pane and click on “Add a role assignment” From the drawer that flies in on the right-hand side, select what fits your scenario. I’m going for “Reader” access only, and since it’s a Function App I select that in the drop down and then it will list all Managed Identities that exist on my App Services: In the list I select: Reader role. I only want to allow my Function App to actually READ data. In the drop-down, I select Function App under the Managed Identities header, which then filters the list by Function App where Managed Identity is enabled. I will see the name of my Function App here, and can select it. Done! We have now successfully configured Managed Identity for our App Configuration service, and the Function App that I just configured can, without credentials since it’s now running under its own identity, access configuration data from this App Configuration store. Now, its time to test the function app, click on Code + Test from left navigation pane and click on Test/Run to check the output. The following image shows the response in the output window returned by the function. Hope this will help.

Share Story :

Service Bus Topic Filters Basics

Learn the Importance of Azure Service Bus Topic Filters with this Blog.

Share Story :

How to Apply Service Bus Topic Subscription Filters?

Learn how to use the SQL and Co-relation Filters for Azure Service Bus Topic Subscription.

Share Story :

How to solve CORs Error

This Blog will guide you on solving the CORs Error. It is a common issue faced by many while configuring and testing their first API in API Management. Few Setting will solve this Problem for you.

Share Story :

SEARCH BLOGS:

[gravityform id="36" ajax="true"]

FOLLOW CLOUDFRONTS BLOG :