You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-create-first-azure-function-azure-cli.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ Navigate into the project folder:
92
92
93
93
::: zone pivot="programming-language-csharp,programming-language-javascript,programming-language-typescript,programming-language-powershell,programming-language-python"
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/sampling.md
+26-4Lines changed: 26 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ When metric counts are presented in the portal, they are renormalized to take in
17
17
18
18
* There are three different types of sampling: adaptive sampling, fixed-rate sampling, and ingestion sampling.
19
19
* Adaptive sampling is enabled by default in all the latest versions of the Application Insights ASP.NET and ASP.NET Core Software Development Kits (SDKs). It is also used by [Azure Functions](https://docs.microsoft.com/azure/azure-functions/functions-overview).
20
-
* Fixed-rate sampling is available in recent versions of the Application Insights SDKs for ASP.NET, ASP.NET Core, Java, and Python.
20
+
* Fixed-rate sampling is available in recent versions of the Application Insights SDKs for ASP.NET, ASP.NET Core, Java (both the agent and the SDK), and Python.
21
21
* Ingestion sampling works on the Application Insights service endpoint. It only applies when no other sampling is in effect. If the SDK samples your telemetry, ingestion sampling is disabled.
22
22
* For web applications, if you log custom events and need to ensure that a set of events is retained or discarded together, the events must have the same `OperationId` value.
23
23
* If you write Analytics queries, you should [take account of sampling](../../azure-monitor/log-query/aggregations.md). In particular, instead of simply counting records, you should use `summarize sum(itemCount)`.
@@ -239,7 +239,7 @@ In Metrics Explorer, rates such as request and exception counts are multiplied b
239
239
</TelemetryProcessors>
240
240
```
241
241
242
-
Alternatively, instead of setting the sampling parameter in the `ApplicationInsights.config` file, you can programmatically set these values:
242
+
Alternatively, instead of setting the sampling parameter in the `ApplicationInsights.config` file, you can programmatically set these values:
243
243
244
244
```csharp
245
245
using Microsoft.ApplicationInsights.Extensibility;
@@ -301,7 +301,29 @@ In Metrics Explorer, rates such as request and exception counts are multiplied b
301
301
302
302
### Configuring fixed-rate sampling for Java applications
303
303
304
-
By default no sampling is enabled in the Java SDK. Currently it only supports fixed rate sampling. Adaptive sampling is not supported in the Java SDK.
304
+
By default no sampling is enabled in the Java agent and SDK. Currently it only supports fixed rate sampling. Adaptive sampling is not supported in Java.
1. To enable sampling add the following to your `ApplicationInsights.json` file:
311
+
312
+
```json
313
+
{
314
+
"instrumentationSettings": {
315
+
"preview": {
316
+
"sampling": {
317
+
"fixedRate": {
318
+
"percentage": 10 //this is just an example that shows you how to enable only only 10% of transaction
319
+
}
320
+
}
321
+
}
322
+
}
323
+
}
324
+
```
325
+
326
+
#### Configuring Java SDK
305
327
306
328
1. Download and configure your web application with the latest [Application Insights Java SDK](../../azure-monitor/app/java-get-started.md).
307
329
@@ -530,7 +552,7 @@ The accuracy of the approximation largely depends on the configured sampling per
530
552
531
553
* Ingestion sampling can occur automatically for any telemetry above a certain volume, if the SDK is not performing sampling. This configuration would work, for example, if you are using an older version of the ASP.NET SDK or Java SDK.
532
554
* If you're using the current ASP.NET or ASP.NET Core SDKs (hosted either in Azure or on your own server), you get adaptive sampling by default, but you can switch to fixed-rate as described above. With fixed-rate sampling, the browser SDK automatically synchronizes to sample related events.
533
-
* If you're using the current Java SDK, you can configure `ApplicationInsights.xml` to turn on fixed-rate sampling. Sampling is turned off by default. With fixed-rate sampling, the browser SDK and the server automatically synchronize to sample related events.
555
+
* If you're using the current Java agent, you can configure `ApplicationInsights.json` (for Java SDK, configure `ApplicationInsights.xml`) to turn on fixed-rate sampling. Sampling is turned off by default. With fixed-rate sampling, the browser SDK and the server automatically synchronize to sample related events.
534
556
535
557
*There are certain rare events I always want to see. How can I get them past the sampling module?*
GET https://management.azure.com/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>?api-version=2020-03-01-preview
124
123
Authorization: Bearer eyJ0eXAiO....
125
124
```
126
125
@@ -130,21 +129,21 @@ You can acquire the token using one of these methods:
130
129
131
130
1. Use [App registrations](https://docs.microsoft.com/graph/auth/auth-concepts#access-tokens) method.
132
131
2. In the Azure portal
133
-
1. Navigate to Azure portal in "developer tool (F12)
134
-
1. Look for authorization string under "Request Headers" in one of the "batch?api-version" instances. It looks like: "authorization: Bearer \<token\>".
132
+
1. Navigate to Azure portal while in "developer tool" (F12)
133
+
1. Look for authorization string under "Request Headers" in one of the "batch?api-version" instances. It looks like: "authorization: Bearer eyJ0eXAiO....".
135
134
1. Copy and add it to your API call per the examples below.
136
135
3. Navigate to Azure REST documentation site. Press "Try it" on any API and copy the Bearer token.
137
136
138
137
### Asynchronous operations and status check
139
138
140
139
Some of the operations in this configuration procedure run asynchronously because they can't be completed quickly. The response for asynchronous operation initially returns an HTTP status code 200 (OK) and header with *Azure-AsyncOperation* property when accepted:
You can check the status of the asynchronous operation by sending a GET request to the *Azure-AsyncOperation* header value:
146
145
```rst
147
-
GET https://management.azure.com/subscriptions/subscription-id/providers/Microsoft.OperationalInsights/locations/region-name/operationStatuses/operation-id?api-version=2015-11-01-preview
146
+
GET https://management.azure.com/subscriptions/subscription-id/providers/microsoft.operationalInsights/locations/region-name/operationstatuses/operation-id?api-version=2020-03-01-preview
148
147
Authorization: Bearer <token>
149
148
```
150
149
@@ -239,11 +238,9 @@ The identity is assigned to the *Cluster* resource at creation time.
239
238
**Response**
240
239
241
240
200 OK and header.
242
-
243
-
>[!Important]
244
-
> During the early access period of the feature, the ADX cluster is provisioned manually. While it takes the provisioning of the underly ADX cluster a while to complete, you can check the provisioning state in two ways:
245
-
> 1. Copy the Azure-AsyncOperation URL value from the response and follow the [asynchronous operations status check](#asynchronous-operations-and-status-check).
246
-
> 2. Send a GET request on the *Cluster* resource and look at the *provisioningState* value. It is *ProvisioningAccount* while provisioning and *Succeeded* when completed.
241
+
During the early access period of the feature, the ADX cluster is provisioned manually. While it takes the provisioning of the underly ADX cluster a while to complete, you can check the provisioning state in two ways:
242
+
1. Copy the Azure-AsyncOperation URL value from the response and follow the [asynchronous operations status check](#asynchronous-operations-and-status-check).
243
+
2. Send a GET request on the *Cluster* resource and look at the *provisioningState* value. It is *ProvisioningAccount* while provisioning and *Succeeded* when completed.
> Copy and save the response since you will need its details in later steps
255
+
> Copy and save the response since you will need the details in next steps.
259
256
260
257
**Response**
261
258
@@ -311,11 +308,11 @@ details.
311
308
312
309
This Resource Manager request is asynchronous operation.
313
310
314
-
>[!Warning]
311
+
>[!Warning]
315
312
> You must provide a full body in *Cluster* resource update that includes *identity*, *sku*, *KeyVaultProperties* and *location*. Missing the *KeyVaultProperties* details will remove the key identifier from the *Cluster* resource and cause [key revocation](#cmk-kek-revocation).
316
313
317
314
```rst
318
-
PUT https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.OperationalInsights/clusters/<cluster-name>?api-version=2019-08-01-preview
315
+
PUT https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.OperationalInsights/clusters/<cluster-name>?api-version=2020-03-01-preview
> It takes the propagation of the Key identifier a few minutes to complete. You can check the provisioning state in two ways:
348
-
> 1. Copy the Azure-AsyncOperation URL value from the response and follow the [asynchronous operations status check](#asynchronous-operations-and-status-check).
349
-
> 2. Send a GET request on the *Cluster* resource and look at the *KeyVaultProperties* properties. Your recently updated Key identifier details should return in the response.
342
+
It takes the propagation of the Key identifier a few minutes to complete. You can check the provisioning state in two ways:
343
+
1. Copy the Azure-AsyncOperation URL value from the response and follow the [asynchronous operations status check](#asynchronous-operations-and-status-check).
344
+
2. Send a GET request on the *Cluster* resource and look at the *KeyVaultProperties* properties. Your recently updated Key identifier details should return in the response.
350
345
351
346
A response to GET request on the *Cluster* resource should look like this when Key identifier update is complete:
352
347
@@ -382,8 +377,6 @@ A response to GET request on the *Cluster* resource should look like this when K
382
377
### Workspace association to *Cluster* resource
383
378
For Application Insights CMK configuration, follow the Appendix content for this step.
384
379
385
-
This Resource Manager request is asynchronous operation.
386
-
387
380
You need to have 'write' permissions to both your workspace and *Cluster* resource to perform this operation, which include these actions:
388
381
389
382
- In workspace: Microsoft.OperationalInsights/workspaces/write
@@ -397,7 +390,7 @@ You need to have 'write' permissions to both your workspace and *Cluster* resour
397
390
This Resource Manager request is asynchronous operation.
398
391
399
392
```rst
400
-
PUT https://management.azure.com/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/microsoft.operationalinsights/workspaces/<workspace-name>/linkedservices/cluster?api-version=2019-08-01-preview
393
+
PUT https://management.azure.com/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/microsoft.operationalinsights/workspaces/<workspace-name>/linkedservices/cluster?api-version=2020-03-01-preview
> Ingested data is stored encrypted with your managed key after association operation, which can take up to 90 minutes to complete. You can check the workspace association state in two ways:
417
-
> 1. Copy the Azure-AsyncOperation URL value from the response and follow the [asynchronous operations status check](#asynchronous-operations-and-status-check).
418
-
> 2. Send a [Workspaces – Get](https://docs.microsoft.com/rest/api/loganalytics/workspaces/get) request and observe the response, associated workspace will have a clusterResourceId under "features".
407
+
Ingested data is stored encrypted with your managed key after association operation, which can take up to 90 minutes to complete. You can check the workspace association state in two ways:
408
+
1. Copy the Azure-AsyncOperation URL value from the response and follow the [asynchronous operations status check](#asynchronous-operations-and-status-check).
409
+
2. Send a [Workspaces – Get](https://docs.microsoft.com/rest/api/loganalytics/workspaces/get) request and observe the response, associated workspace will have a clusterResourceId under "features".
419
410
420
411
```rest
421
-
GET https://management.azure.com/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/microsoft.operationalInsights/workspaces/<workspace-name>?api-version=2015-11-01-preview
412
+
GET https://management.azure.com/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/microsoft.operationalInsights/workspaces/<workspace-name>?api-version=2020-03-01-preview
422
413
```
423
414
424
415
**Response**
@@ -521,7 +512,7 @@ All your data is accessible after the key rotation operation including data inge
521
512
- Get all *Cluster* resources for a resource group:
522
513
523
514
```rst
524
-
GET https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.OperationalInsights/clusters?api-version=2019-08-01-preview
515
+
GET https://management.azure.com/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/Microsoft.OperationalInsights/clusters?api-version=2020-03-01-preview
525
516
Authorization: Bearer <token>
526
517
```
527
518
@@ -558,7 +549,7 @@ All your data is accessible after the key rotation operation including data inge
558
549
- Get all *Cluster* resources for a subscription:
559
550
560
551
```rst
561
-
GET https://management.azure.com/subscriptions/<subscription-id>/providers/Microsoft.OperationalInsights/clusters?api-version=2019-08-01-preview
552
+
GET https://management.azure.com/subscriptions/<subscription-id>/providers/Microsoft.OperationalInsights/clusters?api-version=2020-03-01-preview
562
553
Authorization: Bearer <token>
563
554
```
564
555
@@ -570,8 +561,7 @@ All your data is accessible after the key rotation operation including data inge
570
561
After the soft-delete period, your *Cluster* resource and data are non-recoverable. Associated workspaces are de-associated from the *Cluster* resource and new data is ingested to shared Storage and encrypted with Microsoft key.
@@ -614,8 +604,10 @@ This resource is used as intermediate identity connection between your Key Vault
614
604
615
605
**Create**
616
606
607
+
This Resource Manager request is asynchronous operation.
608
+
617
609
```rst
618
-
PUT https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.OperationalInsights/clusters/<cluster-name>?api-version=2019-08-01-preview
610
+
PUT https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.OperationalInsights/clusters/<cluster-name>?api-version=2020-03-01-preview
> During the early access period of the feature, the ADX cluster is provisioned manually. While it takes the provisioning of the underly ADX cluster a while to complete, you can check the provisioning state in two ways:
642
-
> 1. Copy the Azure-AsyncOperation URL value from the response and follow the [asynchronous operations status check](#asynchronous-operations-and-status-check).
643
-
> 2. Send a GET request on the *Cluster* resource and look at the *provisioningState* value. It is *ProvisioningAccount* while provisioning and *Succeeded* when completed.
631
+
200 OK and header.
632
+
During the early access period of the feature, the ADX cluster is provisioned manually. While it takes the provisioning of the underly ADX cluster a while to complete, you can check the provisioning state in two ways:
633
+
1. Copy the Azure-AsyncOperation URL value from the response and follow the [asynchronous operations status check](#asynchronous-operations-and-status-check).
634
+
2. Send a GET request on the *Cluster* resource and look at the *provisioningState* value. It is *ProvisioningAccount* while provisioning and *Succeeded* when completed.
644
635
645
636
### Associate a component to a *Cluster* resource using [Components - Create Or Update](https://docs.microsoft.com/rest/api/application-insights/components/createorupdate) API
646
637
@@ -654,7 +645,7 @@ You need to have 'write' permissions on both your component and *Cluster* resour
654
645
> To verify that the ADX cluster is provisioned, execute *Cluster* resource Get REST API and check that the *provisioningState* value is *Succeeded*.
655
646
656
647
```rst
657
-
GET https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.OperationalInsights/clusters/<cluster-name>?api-version=2019-08-01-preview
648
+
GET https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.OperationalInsights/clusters/<cluster-name>?api-version=2020-03-01-preview
658
649
Authorization: Bearer <token>
659
650
```
660
651
@@ -689,7 +680,7 @@ Authorization: Bearer <token>
689
680
```
690
681
691
682
> [!IMPORTANT]
692
-
> Copy and keep the "principle-id" value since you will need it in next steps.
683
+
> Copy and keep the response since you will need it in next steps.
0 commit comments