Skip to content

Commit 9f7f77a

Browse files
authored
Merge pull request #116155 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to master to sync with https://github.com/MicrosoftDocs/azure-docs (branch master)
2 parents 4f23c63 + cc37ee3 commit 9f7f77a

File tree

3 files changed

+33
-32
lines changed

3 files changed

+33
-32
lines changed

articles/azure-monitor/app/opencensus-python.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,13 @@ For details on how to modify tracked telemetry before it is sent to Azure Monito
251251

252252
By default, the metrics exporter will send a set of standard metrics to Azure Monitor. You can disable this by setting the `enable_standard_metrics` flag to `False` in the constructor of the metrics exporter.
253253

254-
```python
255-
...
256-
exporter = metrics_exporter.new_metrics_exporter(
257-
enable_standard_metrics=False,
258-
connection_string='InstrumentationKey=<your-instrumentation-key-here>')
259-
...
260-
```
254+
```python
255+
...
256+
exporter = metrics_exporter.new_metrics_exporter(
257+
enable_standard_metrics=False,
258+
connection_string='InstrumentationKey=<your-instrumentation-key-here>')
259+
...
260+
```
261261
Below is a list of standard metrics that are currently sent:
262262

263263
- Available Memory (bytes)
@@ -335,8 +335,8 @@ For details on how to modify tracked telemetry before it is sent to Azure Monito
335335

336336
4. The exporter will send log data to Azure Monitor. You can find the data under `traces`.
337337

338-
> [!NOTE]
339-
> `traces` in this context is not the same as `Tracing`. `traces` refers to the type of telemetry that you will see in Azure Monitor when utilizing the `AzureLogHandler`. `Tracing` refers to a concept in OpenCensus and relates to [distributed tracing](https://docs.microsoft.com/azure/azure-monitor/app/distributed-tracing).
338+
> [!NOTE]
339+
> `traces` in this context is not the same as `Tracing`. `traces` refers to the type of telemetry that you will see in Azure Monitor when utilizing the `AzureLogHandler`. `Tracing` refers to a concept in OpenCensus and relates to [distributed tracing](https://docs.microsoft.com/azure/azure-monitor/app/distributed-tracing).
340340

341341
5. To format your log messages, you can use `formatters` in the built-in Python [logging API](https://docs.python.org/3/library/logging.html#formatter-objects).
342342

@@ -368,8 +368,8 @@ For details on how to modify tracked telemetry before it is sent to Azure Monito
368368
```
369369

370370
6. You can also add custom properties to your log messages in the *extra* keyword argument using the custom_dimensions field. These will appear as key-value pairs in `customDimensions` in Azure Monitor.
371-
> [!NOTE]
372-
> For this feature to work, you need to pass a dictionary to the custom_dimensions field. If you pass arguments of any other type, the logger will ignore them.
371+
> [!NOTE]
372+
> For this feature to work, you need to pass a dictionary to the custom_dimensions field. If you pass arguments of any other type, the logger will ignore them.
373373

374374
```python
375375
import logging
@@ -392,25 +392,25 @@ For details on how to modify tracked telemetry before it is sent to Azure Monito
392392

393393
OpenCensus Python does not automatically track and send `exception` telemetry. They are sent through the `AzureLogHandler` by using exceptions through the Python logging library. You can add custom properties just like with normal logging.
394394

395-
```python
396-
import logging
397-
398-
from opencensus.ext.azure.log_exporter import AzureLogHandler
399-
400-
logger = logging.getLogger(__name__)
401-
# TODO: replace the all-zero GUID with your instrumentation key.
402-
logger.addHandler(AzureLogHandler(
403-
connection_string='InstrumentationKey=00000000-0000-0000-0000-000000000000')
404-
)
395+
```python
396+
import logging
405397

406-
properties = {'custom_dimensions': {'key_1': 'value_1', 'key_2': 'value_2'}}
398+
from opencensus.ext.azure.log_exporter import AzureLogHandler
407399

408-
# Use properties in exception logs
409-
try:
410-
result = 1 / 0 # generate a ZeroDivisionError
411-
except Exception:
412-
logger.exception('Captured an exception.', extra=properties)
413-
```
400+
logger = logging.getLogger(__name__)
401+
# TODO: replace the all-zero GUID with your instrumentation key.
402+
logger.addHandler(AzureLogHandler(
403+
connection_string='InstrumentationKey=00000000-0000-0000-0000-000000000000')
404+
)
405+
406+
properties = {'custom_dimensions': {'key_1': 'value_1', 'key_2': 'value_2'}}
407+
408+
# Use properties in exception logs
409+
try:
410+
result = 1 / 0 # generate a ZeroDivisionError
411+
except Exception:
412+
logger.exception('Captured an exception.', extra=properties)
413+
```
414414
Since you must log exceptions explicitly, it is up to the user in how they want to log unhandled exceptions. OpenCensus does not place restrictions in how a user wants to do this, as long as they explicitly log an exception telemetry.
415415

416416
#### Sampling

includes/virtual-machines-common-premium-storage-performance.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ High Scale VMs that leverage Azure Premium Storage have a multi-tier caching tec
232232
> [!WARNING]
233233
> Disk Caching is not supported for disks 4 TiB and larger. If multiple disks are attached to your VM, each disk that is smaller than 4 TiB will support caching.
234234
>
235-
> Changing the cache setting of an Azure disk detaches and re-attaches the target disk. If it is the operating system disk, the VM is restarted. Stop all applications/services that might be affected by this disruption before changing the disk cache setting.
235+
> Changing the cache setting of an Azure disk detaches and re-attaches the target disk. If it is the operating system disk, the VM is restarted. Stop all applications/services that might be affected by this disruption before changing the disk cache setting. Not following those recommendations could lead to data corruption.
236236
237237
To learn more about how BlobCache works, refer to the Inside [Azure Premium Storage](https://azure.microsoft.com/blog/azure-premium-storage-now-generally-available-2/) blog post.
238238

@@ -379,3 +379,4 @@ For a striped volume, maintain a high enough queue depth such that, every disk h
379379
Azure Premium Storage provisions specified number of IOPS and Throughput depending on the VM sizes and disk sizes you choose. Anytime your application tries to drive IOPS or Throughput above these limits of what the VM or disk can handle, Premium Storage will throttle it. This manifests in the form of degraded performance in your application. This can mean higher latency, lower Throughput, or lower IOPS. If Premium Storage does not throttle, your application could completely fail by exceeding what its resources are capable of achieving. So, to avoid performance issues due to throttling, always provision sufficient resources for your application. Take into consideration what we discussed in the VM sizes and Disk sizes sections above. Benchmarking is the best way to figure out what resources you will need to host your application.
380380

381381
## Next steps
382+

includes/virtual-machines-image-builder-overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ AIB will support Azure Marketplace base OS images:
5151
- Windows 2016
5252
- Windows 2019
5353

54-
RHEL ISOs support is not longer supported.
54+
RHEL ISOs support is no longer supported.
5555
## How it works
5656

5757

@@ -68,15 +68,15 @@ The Azure Image Builder is a fully managed Azure service that is accessible by a
6868
1. Create the Image Template as a .json file. This .json file contains information about the image source, customizations, and distribution. There are multiple examples in the [Azure Image Builder GitHub repository](https://github.com/danielsollondon/azvmimagebuilder/tree/master/quickquickstarts).
6969
1. Submit it to the service, this will create an Image Template artifact in the resource group you specify. In the background, Image Builder will download the source image or ISO, and scripts as needed. These are stored in a separate resource group that is automatically created in your subscription, in the format: IT_\<DestinationResourceGroup>_\<TemplateName>.
7070
1. Once the Image Template is created, you can then build the image. In the background Image Builder uses the template and source files to create a VM (default size: Standard_D1_v2), network, public IP, NSG, and storage in the IT_\<DestinationResourceGroup>_\<TemplateName> resource group.
71-
1. As part of the image creation, Image builder distributes the image it according to the template, then deletes the additional resources in the IT_\<DestinationResourceGroup>_\<TemplateName> resource group that was created for the process.
71+
1. As part of the image creation, Image builder distributes the image according to the template, then deletes the additional resources in the IT_\<DestinationResourceGroup>_\<TemplateName> resource group that was created for the process.
7272

7373

7474
## Permissions
7575
When you register for the (AIB), this grants the AIB Service permission to create, manage and delete a staging resource group (IT_*), and have rights to add resources to it, that are required for the image build. This is done by an AIB Service Principal Name (SPN) being made available in your subscription during a successful registration.
7676

7777
To allow Azure VM Image Builder to distribute images to either the managed images or to a Shared Image Gallery, you will need to create an Azure user-assigned identity that has permissions to read and write images. If you are accessing Azure storage, then this will need permissions to read private containers.
7878

79-
Initially you must [create Azure user-assigned managed identity](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-cli) documentation on how to create an identity.
79+
Initially you must follow [create Azure user-assigned managed identity](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-cli) documentation on how to create an identity.
8080

8181
Once you have the identity you need to grant it permissions, to do this, you can use an Azure Custom Role Definition, and then assign the user-assigned managed identity to use the Custom Role Definition.
8282

0 commit comments

Comments
 (0)