Skip to content

Commit bb61847

Browse files
authored
Merge pull request #221094 from MicrosoftDocs/main
Publish to live, Sunday 4 AM PST, 12/11
2 parents ed5c71c + 8a6ca98 commit bb61847

31 files changed

+292
-145
lines changed

articles/api-management/api-management-howto-developer-portal-customize.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ Although you don't need to adjust any styles, you may consider adjusting particu
168168
You can control which portal content appears to different users, based on their identity. For example, you might want to display certain pages only to users who have access to a specific product or API. Or, make a section of a page appear only for certain [groups of users](api-management-howto-create-groups.md). The developer portal has built-in controls for these needs.
169169

170170
> [!NOTE]
171-
> Visibility and access controls are supported only in the managed developer portal. They are not supported in the [self-hosted portal](developer-portal-self-host.md).
171+
> * These controls are being released during December 2022. It may take several weeks for your API Management service to receive the update.
172+
> * Visibility and access controls are supported only in the managed developer portal. They are not supported in the [self-hosted portal](developer-portal-self-host.md).
172173
173174
* When you add or edit a page, select the **Access** tab to control the users or groups that can access the page
174175

articles/azure-functions/functions-dotnet-class-library.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The order of parameters in the function signature doesn't matter. For example, y
100100

101101
### Output bindings
102102

103-
A function can have zero or one output bindings defined by using output parameters.
103+
A function can have zero or multiple output bindings defined by using output parameters.
104104

105105
The following example modifies the preceding one by adding an output queue binding named `myQueueItemCopy`. The function writes the contents of the message that triggers the function to a new message in a different queue.
106106

articles/azure-monitor/agents/azure-monitor-agent-manage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The following prerequisites must be met prior to installing Azure Monitor Agent.
5959

6060
- global.handler.control.monitor.azure.com
6161
- `<virtual-machine-region-name>`.handler.control.monitor.azure.com (example: westus.handler.control.azure.com)
62-
- `<log-analytics-workspace-id>`.ods.opinsights.azure.com (example: 12345a01-b1cd-1234-e1f2-1234567g8h99.ods.opsinsights.azure.com)
62+
- `<log-analytics-workspace-id>`.ods.opinsights.azure.com (example: 12345a01-b1cd-1234-e1f2-1234567g8h99.ods.opinsights.azure.com)
6363
(If you use private links on the agent, you must also add the [dce endpoints](../essentials/data-collection-endpoint-overview.md#components-of-a-data-collection-endpoint)).
6464

6565
> [!NOTE]

articles/azure-monitor/agents/azure-monitor-agent-windows-client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Here is a comparison between client installer and VM extension for Azure Monitor
5050
5. The device must have access to the following HTTPS endpoints:
5151
- global.handler.control.monitor.azure.com
5252
- `<virtual-machine-region-name>`.handler.control.monitor.azure.com (example: westus.handler.control.azure.com)
53-
- `<log-analytics-workspace-id>`.ods.opinsights.azure.com (example: 12345a01-b1cd-1234-e1f2-1234567g8h99.ods.opsinsights.azure.com)
53+
- `<log-analytics-workspace-id>`.ods.opinsights.azure.com (example: 12345a01-b1cd-1234-e1f2-1234567g8h99.ods.opinsights.azure.com)
5454
(If using private links on the agent, you must also add the [data collection endpoints](../essentials/data-collection-endpoint-overview.md#components-of-a-data-collection-endpoint))
5555
6. Existing data collection rule(s) you wish to associate with the devices. If it doesn't exist already, [follow the guidance here to create data collection rule(s)](./data-collection-rule-azure-monitor-agent.md#create-data-collection-rule-and-association). **Do not associate the rule to any resources yet**.
5656

articles/azure-monitor/alerts/itsmc-definition.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ After you create your ITSM connection, use the ITSM action in action groups to c
7474

7575
Certain work item types can use templates that you define in ServiceNow. When you use templates, you can define fields that will be automatically populated by using constant values defined in ServiceNow (not values from the payload). The templates are synced with Azure. You can define which template you want to use as a part of the definition of an action group. For information about how to create templates, see the [ServiceNow documentation](https://docs.servicenow.com/en-US/bundle/tokyo-platform-administration/page/administer/form-administration/task/t_CreateATemplateUsingTheTmplForm.html).
7676

77+
### Create ITSM work items
78+
7779
To create an action group:
7880

7981
1. In the Azure portal, select **Monitor** > **Alerts**.

articles/azure-monitor/app/performance-counters.md

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,25 +112,50 @@ Or you can do the same thing with custom metrics that you created:
112112
113113
### Collect performance counters in code for ASP.NET Core web applications
114114
115-
Modify the `ConfigureServices` method in your `Startup.cs` class:
115+
### [ASP.NET Core 6 and later](#tab/net-core-new)
116+
117+
Configure `PerformanceCollectorModule` after the `WebApplication.CreateBuilder()` method in `Program.cs`:
116118
117119
```csharp
118120
using Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector;
119121
120-
public void ConfigureServices(IServiceCollection services)
122+
var builder = WebApplication.CreateBuilder(args);
123+
124+
builder.Services.AddApplicationInsightsTelemetry();
125+
126+
// The following configures PerformanceCollectorModule.
127+
128+
builder.Services.ConfigureTelemetryModule<PerformanceCollectorModule>((module, o) =>
121129
{
122-
services.AddApplicationInsightsTelemetry();
123-
124-
// The following configures PerformanceCollectorModule.
125-
services.ConfigureTelemetryModule<PerformanceCollectorModule>((module, o) =>
126-
{
127-
// the application process name could be "dotnet" for ASP.NET Core self-hosted applications.
128-
module.Counters.Add(new PerformanceCounterCollectionRequest(
129-
@"\Process([replace-with-application-process-name])\Page Faults/sec", "DotnetPageFaultsPerfSec"));
130-
});
131-
}
130+
// The application process name could be "dotnet" for ASP.NET Core self-hosted applications.
131+
module.Counters.Add(new PerformanceCounterCollectionRequest(@"\Process([replace-with-application-process-name])\Page Faults/sec", "DotnetPageFaultsPerfSec"));
132+
});
133+
134+
var app = builder.Build();
135+
```
136+
137+
### [ASP.NET Core 5 and earlier](#tab/net-core-old)
138+
139+
Configure `PerformanceCollectorModule` in the `ConfigureServices()` method in `Startup.cs`:
140+
141+
```csharp
142+
using Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector;
143+
144+
public void ConfigureServices(IServiceCollection services)
145+
{
146+
services.AddApplicationInsightsTelemetry();
147+
148+
// The following configures PerformanceCollectorModule:
149+
services.ConfigureTelemetryModule<PerformanceCollectorModule>((module, o) =>
150+
{
151+
// The application process name could be "dotnet" for ASP.NET Core self-hosted applications.
152+
module.Counters.Add(new PerformanceCounterCollectionRequest(@"\Process([replace-with-application-process-name])\PageFaults/sec", "DotnetPageFaultsPerfSec"));
153+
});
154+
}
132155
```
133156
157+
---
158+
134159
## Performance counters in Log Analytics
135160
You can search and display performance counter reports in [Log Analytics](../logs/log-query-overview.md).
136161

articles/azure-monitor/app/sampling.md

Lines changed: 113 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.reviewer: mmcc
99

1010
# Sampling in Application Insights
1111

12-
Sampling is a feature in [Azure Application Insights](./app-insights-overview.md). It's the recommended way to reduce telemetry traffic, data costs, and storage costs, while preserving a statistically correct analysis of application data. Sampling also helps you avoid Application Insights throttling your telemetry. The sampling filter selects items that are related, so that you can navigate between items when you're doing diagnostic investigations.
12+
Sampling is a feature in [Application Insights](./app-insights-overview.md). It's the recommended way to reduce telemetry traffic, data costs, and storage costs, while preserving a statistically correct analysis of application data. Sampling also helps you avoid Application Insights throttling your telemetry. The sampling filter selects items that are related, so that you can navigate between items when you're doing diagnostic investigations.
1313

1414
When metric counts are presented in the portal, they're renormalized to take into account sampling. Doing so minimizes any effect on the statistics.
1515

@@ -139,7 +139,7 @@ In [`ApplicationInsights.config`](./configuration-with-applicationinsights-confi
139139
Instead of setting the sampling parameter in the `.config` file, you can programmatically set these values.
140140

141141
1. Remove all the `AdaptiveSamplingTelemetryProcessor` node(s) from the `.config` file.
142-
2. Use the following snippet to configure adaptive sampling:
142+
1. Use the following snippet to configure adaptive sampling:
143143

144144
```csharp
145145
using Microsoft.ApplicationInsights;
@@ -179,21 +179,37 @@ Adaptive sampling is enabled by default for all ASP.NET Core applications. You c
179179

180180
#### Turning off adaptive sampling
181181

182-
The default sampling feature can be disabled while adding Application Insights service, in the method `ConfigureServices`, using `ApplicationInsightsServiceOptions` within the `Startup.cs` file:
182+
The default sampling feature can be disabled while adding the Application Insights service.
183+
184+
### [ASP.NET Core 6 and later](#tab/net-core-new)
185+
186+
Add `ApplicationInsightsServiceOptions` after the `WebApplication.CreateBuilder()` method in the `Program.cs` file:
187+
188+
```csharp
189+
var builder = WebApplication.CreateBuilder(args);
190+
191+
var aiOptions = new Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions();
192+
aiOptions.EnableAdaptiveSampling = false;
193+
builder.Services.AddApplicationInsightsTelemetry(aiOptions);
194+
195+
var app = builder.Build();
196+
```
197+
198+
### [ASP.NET Core 5 and earlier](#tab/net-core-old)
199+
200+
Add `ApplicationInsightsServiceOptions` to the `ConfigureServices()` method in the `Startup.cs` file:
183201

184202
```csharp
185203
public void ConfigureServices(IServiceCollection services)
186204
{
187-
// ...
188-
189205
var aiOptions = new Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions();
190206
aiOptions.EnableAdaptiveSampling = false;
191207
services.AddApplicationInsightsTelemetry(aiOptions);
192-
193-
//...
194208
}
195209
```
196210

211+
---
212+
197213
The above code will disable adaptive sampling. Follow the steps below to add sampling with more customization options.
198214

199215
#### Configure sampling settings
@@ -203,6 +219,39 @@ Use extension methods of `TelemetryProcessorChainBuilder` as shown below to cust
203219
> [!IMPORTANT]
204220
> If you use this method to configure sampling, please make sure to set the `aiOptions.EnableAdaptiveSampling` property to `false` when calling `AddApplicationInsightsTelemetry()`. After making this change, you then need to follow the instructions in the code block below **exactly** in order to re-enable adaptive sampling with your customizations in place. Failure to do so can result in excess data ingestion. Always test post changing sampling settings, and set an appropriate [daily data cap](../logs/daily-cap.md) to help control your costs.
205221
222+
### [ASP.NET Core 6 and later](#tab/net-core-new)
223+
224+
```csharp
225+
using Microsoft.ApplicationInsights.AspNetCore.Extensions;
226+
using Microsoft.ApplicationInsights.Extensibility;
227+
228+
var builder = WebApplication.CreateBuilder(args);
229+
230+
builder.Services.Configure<TelemetryConfiguration>(telemetryConfiguration =>
231+
{
232+
var builder = telemetryConfiguration.DefaultTelemetrySink.TelemetryProcessorChainBuilder;
233+
234+
// Using adaptive sampling
235+
builder.UseAdaptiveSampling(maxTelemetryItemsPerSecond: 5);
236+
237+
// Alternately, the following configures adaptive sampling with 5 items per second, and also excludes DependencyTelemetry from being subject to sampling:
238+
// configuration.DefaultTelemetrySink.TelemetryProcessorChainBuilder.UseAdaptiveSampling(maxTelemetryItemsPerSecond:5, excludedTypes: "Dependency");
239+
240+
// If you have other telemetry processors:
241+
builder.Use(next => new AnotherProcessor(next));
242+
243+
});
244+
245+
builder.Services.AddApplicationInsightsTelemetry(new ApplicationInsightsServiceOptions
246+
{
247+
EnableAdaptiveSampling = false,
248+
});
249+
250+
var app = builder.Build();
251+
```
252+
253+
### [ASP.NET Core 5 and earlier](#tab/net-core-old)
254+
206255
```csharp
207256
using Microsoft.ApplicationInsights.Extensibility
208257

@@ -222,11 +271,11 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, Telemetr
222271
builder.Use((next) => new AnotherProcessor(next));
223272

224273
builder.Build();
225-
226-
// ...
227274
}
228275
```
229276

277+
---
278+
230279
### Configuring adaptive sampling for Azure Functions
231280

232281
Follow instructions from [this page](../../azure-functions/configure-monitoring.md#configure-sampling) to configure adaptive sampling for apps running in Azure Functions.
@@ -252,7 +301,7 @@ In Metrics Explorer, rates such as request and exception counts are multiplied b
252301
-->
253302
```
254303

255-
2. **Enable the fixed-rate sampling module.** Add this snippet to [`ApplicationInsights.config`](./configuration-with-applicationinsights-config.md):
304+
1. **Enable the fixed-rate sampling module.** Add this snippet to [`ApplicationInsights.config`](./configuration-with-applicationinsights-config.md):
256305

257306
```xml
258307
<TelemetryProcessors>
@@ -264,8 +313,8 @@ In Metrics Explorer, rates such as request and exception counts are multiplied b
264313
</TelemetryProcessors>
265314
```
266315

267-
Alternatively, instead of setting the sampling parameter in the `ApplicationInsights.config` file, you can programmatically set these values:
268-
316+
Alternatively, instead of setting the sampling parameter in the `ApplicationInsights.config` file, you can programmatically set these values:
317+
269318
```csharp
270319
using Microsoft.ApplicationInsights.Extensibility;
271320
using Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel;
@@ -288,22 +337,66 @@ In Metrics Explorer, rates such as request and exception counts are multiplied b
288337

289338
### Configuring fixed-rate sampling for ASP.NET Core applications
290339

291-
1. **Disable adaptive sampling**: Changes can be made in the `ConfigureServices` method, using `ApplicationInsightsServiceOptions`:
340+
1. **Disable adaptive sampling**
341+
342+
### [ASP.NET Core 6 and later](#tab/net-core-new)
343+
344+
Changes can be made after the `WebApplication.CreateBuilder()` method, using `ApplicationInsightsServiceOptions`:
345+
346+
```csharp
347+
var builder = WebApplication.CreateBuilder(args);
348+
349+
var aiOptions = new Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions();
350+
aiOptions.EnableAdaptiveSampling = false;
351+
builder.Services.AddApplicationInsightsTelemetry(aiOptions);
352+
353+
var app = builder.Build();
354+
```
355+
356+
### [ASP.NET Core 5 and earlier](#tab/net-core-old)
357+
358+
Changes can be made in the `ConfigureServices()` method, using `ApplicationInsightsServiceOptions`:
292359

293360
```csharp
294361
public void ConfigureServices(IServiceCollection services)
295362
{
296-
// ...
297-
298363
var aiOptions = new Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions();
299364
aiOptions.EnableAdaptiveSampling = false;
300365
services.AddApplicationInsightsTelemetry(aiOptions);
301-
302-
//...
303366
}
304367
```
368+
369+
---
370+
371+
1. **Enable the fixed-rate sampling module**
372+
373+
### [ASP.NET Core 6 and later](#tab/net-core-new)
374+
375+
Changes can be made after the `WebApplication.CreateBuilder()` method:
376+
377+
```csharp
378+
var builder = WebApplication.CreateBuilder(args);
379+
380+
builder.Services.Configure<TelemetryConfiguration>(telemetryConfiguration =>
381+
{
382+
var builder = telemetryConfiguration.DefaultTelemetrySink.TelemetryProcessorChainBuilder;
383+
384+
// Using fixed rate sampling
385+
double fixedSamplingPercentage = 10;
386+
builder.UseSampling(fixedSamplingPercentage);
387+
});
388+
389+
builder.Services.AddApplicationInsightsTelemetry(new ApplicationInsightsServiceOptions
390+
{
391+
EnableAdaptiveSampling = false,
392+
});
393+
394+
var app = builder.Build();
395+
```
305396

306-
2. **Enable the fixed-rate sampling module.** Changes can be made in the `Configure` method as shown in the below snippet:
397+
### [ASP.NET Core 5 and earlier](#tab/net-core-old)
398+
399+
Changes can be made in the `Configure()` method:
307400

308401
```csharp
309402
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
@@ -319,11 +412,11 @@ In Metrics Explorer, rates such as request and exception counts are multiplied b
319412
builder.UseSampling(fixedSamplingPercentage);
320413

321414
builder.Build();
322-
323-
// ...
324415
}
325416
```
326417

418+
---
419+
327420
### Configuring sampling overrides and fixed-rate sampling for Java applications
328421

329422
By default no sampling is enabled in the Java auto-instrumentation and SDK. Currently the Java auto-instrumentation, [sampling overrides](./java-standalone-sampling-overrides.md) and fixed rate sampling are supported. Adaptive sampling isn't supported in Java.

articles/azure-monitor/logs/manage-access.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ To create a [custom role](../../role-based-access-control/custom-roles.md) that
282282

283283
1. Create a custom role that grants users permission to execute queries in the Log Analytics workspace, based on the built-in Azure Monitor Logs **Reader** role:
284284

285-
1. Navigate to your workspace and select **Access control (AIM)** > **Roles**.
285+
1. Navigate to your workspace and select **Access control (IAM)** > **Roles**.
286286

287287
1. Right-click the **Reader** role and select **Clone**.
288288

articles/azure-monitor/profiler/profiler-containers.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ In this article, you'll learn the various ways you can:
4747

4848
We've added delay in the `Controllers/WeatherForecastController.cs` project to simulate the bottleneck.
4949
50-
```CSharp
50+
```csharp
5151
[HttpGet(Name = "GetWeatherForecast")]
5252
public IEnumerable<WeatherForecast> Get()
5353
{
@@ -68,16 +68,36 @@ In this article, you'll learn the various ways you can:
6868
dotnet add package Microsoft.ApplicationInsights.Profiler.AspNetCore
6969
```
7070
71-
1. Enable Application Insights and Profiler in `Startup.cs`:
71+
1. Enable Application Insights and Profiler:
72+
73+
### [ASP.NET Core 6 and later](#tab/net-core-new)
74+
75+
Add `builder.Services.AddApplicationInsightsTelemetry()` and `builder.Services.AddServiceProfiler()` after the `WebApplication.CreateBuilder()` method in `Program.cs`:
76+
77+
```csharp
78+
var builder = WebApplication.CreateBuilder(args);
7279
73-
```csharp
74-
public void ConfigureServices(IServiceCollection services)
75-
{
76-
services.AddApplicationInsightsTelemetry(); // Add this line of code to enable Application Insights.
77-
services.AddServiceProfiler(); // Add this line of code to Enable Profiler
78-
services.AddControllersWithViews();
79-
}
80-
```
80+
builder.Services.AddApplicationInsightsTelemetry(); // Add this line of code to enable Application Insights.
81+
builder.Services.AddServiceProfiler(); // Add this line of code to enable Profiler
82+
builder.Services.AddControllersWithViews();
83+
84+
var app = builder.Build();
85+
```
86+
87+
### [ASP.NET Core 5 and earlier](#tab/net-core-old)
88+
89+
Add `services.AddApplicationInsightsTelemetry()` and `services.AddServiceProfiler()` to the `ConfigureServices()` method in `Startup.cs`:
90+
91+
```csharp
92+
public void ConfigureServices(IServiceCollection services)
93+
{
94+
services.AddApplicationInsightsTelemetry(); // Add this line of code to enable Application Insights.
95+
services.AddServiceProfiler(); // Add this line of code to enable Profiler
96+
services.AddControllersWithViews();
97+
}
98+
```
99+
100+
---
81101
82102
## Pull the latest ASP.NET Core build/runtime images
83103

0 commit comments

Comments
 (0)