Azure Archives - Page 11 of 14 - - Page 11

Category Archives: Azure

Developer Tools for Logic Apps 4: Using the Visual Studio Code to create your Logic Apps

Posted On February 9, 2021 by Yogesh Gore Posted in

VS Code is the light weight and yet powerful editor to create logic app. In order to create logic app in VS code you must have Visual Studio Code 1.31.0 (January 2019) or later. To start with, first, you must install the extension from the marketplace. To do that, search Azure Logic Apps extension in the marketplace and Click on Install. Open your Visual Studio Code and bring up the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of VS Code. And search Azure Logic Apps; After the installation of these extensions, you will find the two Azure Logic Apps section and then click on the Sign In Azure option. After you sign in then navigate to  your subscriptions and create new Logic app (for this you need to right click on the subscription and select create new logic app) This will open a small Logic App creation wizard on the top, in the center of the Visual Studio Code window, asking if we want to Create a new resource group or choose an existing one. If we select Create new resource group, then a new window appears asking for you to provide the resource group name Then we need to select a location to where the resource will be added In last step of the wizard will be providing a name for your Logic App

Share Story :

How to Read value from App Configuration in Logic App

Posted On February 9, 2021 by Yogesh Gore Posted in

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 App configuration is useful in following Scenario. Centralize management and distribution of hierarchical configuration data for different environments and geographies Dynamically change application settings without the need to redeploy or restart an application Control feature availability in real-time The only problem was that unlike Key Vault, which has an available connector to be used inside Logic Apps, App Configuration doesn’t have a connector available. So in order to implement this scenario we’ll going to use Azure function app Create an 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 Httptrigger function app 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. Add the following namespaces of the .NET Core configuration and the App Configuration provider. using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration.AzureAppConfiguration; The key that we want to read should be passed by query parameter. string appKey = req.Query[“appKey”]; And finally, the function should raise proper HTTP response status codes according to the situation: 200 Ok if successful returns a value for that key 500 Internal Server Error if something fails, for example, there is no connection string to the App Configuration defined and 404 Not Found if the key is not found Use below code for reference if(string.IsNullOrEmpty(appKey))                 return new BadRequestObjectResult(“parameter ‘appKey’ not found or empty.”);             try             {                 string connectionString = Environment.GetEnvironmentVariable(“AppConfigConnection”);                 var builder = new ConfigurationBuilder();                 builder.AddAzureAppConfiguration(connectionString);                 var build = builder.Build();                 string keyValue = build[appKey.ToString()];                 if (string.IsNullOrEmpty(keyValue))                 {                     var result = new ObjectResult(“Azure Configuration Key not found – ” + appKey);                     result.StatusCode = StatusCodes.Status404NotFound;                     return result;                 }                 else return new OkObjectResult(keyValue);             }             catch(Exception ex)             {                 var result = new ObjectResult(ex.Message);                 result.StatusCode = StatusCodes.Status500InternalServerError;                 return result;             } Once you create your Function App and all you key-values inside App Configuration, you have to: Go to your Function App Configuration option under Settings  And create a new application settings call AppConfigConnection containing the connection string to your App Configuration resource. Once we done that you can call Azure Function in your logic app

Share Story :

Handling Pagination in Logic App for JSON payloads having Linked

This blog will guide you through how the paginated data from API’s can be handled and Processed in Azure Logic App.

Share Story :

How to Use Messaging Service in Azure?

Posted On January 4, 2021 by Yogesh Gore Posted in

Microsoft Azure offer two different messaging services like Service Bus and Storage queues they are mainly used for to perform specific action or send response. Azure Service Bus It is the one of the oldest services of the Azure platform – it is a highly reliable, brokered cloud messaging system. This service is aimed for enterprise messaging scenarios and offers middleware technologies like message queueing and publish or subscribe messaging. Following are the capability for Service Bus Queues are offering an asynchronous messaging capability with first-in-first-out (FIFO) message delivery. Topics and subscriptions offer a similar capability as queues. However, there can be more consumers for messages that are sent to a topic. A topic has one or more subscriptions. Relay provides a gateway to connect on-premise services to Azure, without having to open a firewall connection to the network. Azure Service Bus is available in three tiers: Basic – queues and scheduled messages, and message size up to 256 KB. Standard – on top of basic with Topics and subscriptions, transactions, sessions, and de-duplication. Premium – on top of the standard, and message size up to 1 MB. How to Create Azure Service Bus Go to Azure Portal Click on New Resource and Select service bus component from Integration services. Select your Subscription, Resource Group and give a proper Name space and Select location. Select the Pricing tier as per convenient check the pricing https://azure.microsoft.com/en-in/pricing/details/service-bus/ Create namespace and add tags for resource as shown below A namespace is a scoping container for all messaging components. Multiple queues and topics can reside within a single namespace, and namespaces often serve as application containers. Review and Create the Service Bus Resource. Queues Messages are sent to and received from queues. Queues enable you to store messages until the receiving application is available to receive and process them. Messages in queues are ordered and timestamped on arrival. Once accepted, the message is held safely in redundant storage. Messages are delivered in pull mode, which delivers messages on request. Topics While a queue is often used for point-to-point communication, topics are useful in publish/subscribe scenarios. Topics can have multiple, independent subscriptions. A subscriber to a topic can receive a copy of each message sent to that topic. Subscriptions are named entities, which are durably created but can optionally expire or auto-delete. In some scenarios, you may not want individual subscriptions to receive all messages sent to a topic. If so, you can use rules and filters to define conditions that trigger optional actions, filter specified messages and set or modify message properties.

Share Story :

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 :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange