Page 51 - MSDN Magazine, December 15, 2017
P. 51

multicolor
hit-
highlighting
easy
options
®
status codes in a live metrics stream, and query up to 90 days of historical data in the analytics portal.
For example, enter the following query into the analysis portal to see what days of the week your API receives the most requests:
requests
| where timestamp > ago(90d)
| summarize count() by dayofweek(timestamp)
Debug Proxies: Azure Functions Proxies has the ability to gen- erate debug traces upon request. They allow you to see what rules were applied to a particular request, along with the request info. Send a request to a proxies endpoint along with the header Proxy- Trace-Enabled set to true, and you’ll receive a header back with a link to the trace file. You can also set debug: true for a proxy in proxies.json to generate a debug trace for every request. The trace is stored under the function’s blob storage, which is only accessible to members of your Azure subscription.
Run Azure Functions Proxies Locally: As a part of the general availability of Azure Functions Proxies, you can now run it locally, using the Azure Functions Core Tools. Find them at aka.ms/functionscoretools.
Create proxies locally with the following line:
func proxy create [--name] [--route] [--methods] [--backend-url]
And then run those proxies by typing:
func host start
You can then send API requests to the local function endpoint using Postman, Fiddler and so on. See a full list of commands and samples at aka.ms/functionscoretools.
When proxying functions in the same function app, you can use the localhost back-end URI to reference a local function. This allows you to have one unified keyword to proxy the same func- tion locally and when deployed to the cloud. Localhost in Azure Functions Proxies is a keyword, so you don’t have to worry about appending the correct port when running locally.
Here’s an example of a simple proxy to a function in the same function app:
"LocalFunction": { "matchCondition": {
"route": "/localfn1" },
"backendUri": "https://localhost/api/httptriggercsharp1" }
Give Functions Proxies a Try
We’re very excited for the general availability of Azure Functions Proxies, and hope you’ll give it a try. Azure Functions has a gen- erous charter of 1 million free executions and 400,000 free Gbps per month, giving you no reason to hold off on playing with Azure Functions Proxies. Serverless has been gaining traction fast in cloud native development, and now is the perfect time to jump on board.
We love feedback, and you can reach out to the product team on Twitter @azurefunctions, or submit a GitHub issue with any feature requests or issues at github.com/Azure/Azure-Functions. n
Alex KArcher is a program manager on Azure Functions, working on API tools such as Proxies and OpenAPI. He’s on Twitter: @alexkarcher.
ThAnKs to the product team for their technical expertise in reviewing this article: Matthew Henderson, Galin Iliev, Eduardo Laureano, Omkar More,
Hamid Safi, Colby Tresness
msdnmagazine.com
Instantly Search Terabytes of Data
across a desktop, network, Internet or Intranet site with dtSearch enterprise and developer products
Over 25 search features, with
dtSearch’s document filters support popular file types, emails with multilevel attachments, databases, web data
Developers:
• APIs for .NET, Java and C++
• SDKs for Windows, UWP, Linux, Mac and Android
• See dtSearch.com for articles on faceted search, advanced data classification, working with SQL, NoSQL & other DBs, MS Azure, etc.
Visit dtSearch.com for
• hundreds of reviews and case studies • fully-functional evaluations
® The Smart Choice for Text Retrieval
since 1991
dtSearch.com 1-800-IT-FINDS
























































   49   50   51   52   53