Skip to content

Commit 171e85f

Browse files
authored
Merge pull request #41490 from lzchen/correlation
Some fixes to Correlation doc for OpenCensus Python
2 parents b396943 + e060e30 commit 171e85f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

articles/azure-monitor/app/correlation.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.reviewer: sergkanz
1313

1414
# Telemetry correlation in Application Insights
1515

16-
In the world of microservices, every logical operation requires work to be done in various components of the service. Each of these components can be monitored separately by [Azure Application Insights](../../azure-monitor/app/app-insights-overview.md). The web-app component communicates with the authentication provider component to validate user credentials, and with the API component to get data for visualization. The API component can query data from other services and use cache-provider components to notify the billing component about this call. Application Insights supports distributed telemetry correlation, which you use to detect which component is responsible for failures or performance degradation.
16+
In the world of microservices, every logical operation requires work to be done in various components of the service. Each of these components can be monitored separately by [Azure Application Insights](../../azure-monitor/app/app-insights-overview.md). Application Insights supports distributed telemetry correlation, which you use to detect which component is responsible for failures or performance degradation.
1717

1818
This article explains the data model used by Application Insights to correlate telemetry sent by multiple components. It covers context-propagation techniques and protocols. It also covers the implementation of correlation concepts on different languages and platforms.
1919

@@ -217,7 +217,7 @@ OpenCensus Python follows the `OpenTracing` data model specifications outlined a
217217
218218
### Incoming request correlation
219219
220-
OpenCensus Python correlates W3C Trace Context headers from incoming requests to the spans that are generated from the requests themselves. OpenCensus will do this automatically with integrations for popular web application frameworks such as `flask`, `django` and `pyramid`. The W3C Trace Context headers simply need to be populated with the [correct format](https://www.w3.org/TR/trace-context/#trace-context-http-headers-format)and sent with the request. Below is an example `flask` application demonstrating this.
220+
OpenCensus Python correlates W3C Trace Context headers from incoming requests to the spans that are generated from the requests themselves. OpenCensus will do this automatically with integrations for the following popular web application frameworks: `flask`, `django` and `pyramid`. The W3C Trace Context headers simply need to be populated with the [correct format](https://www.w3.org/TR/trace-context/#trace-context-http-headers-format) and sent with the request. Below is an example `flask` application demonstrating this.
221221
222222
```python
223223
from flask import Flask
@@ -250,7 +250,7 @@ Looking at the [Trace Context Header Format](https://www.w3.org/TR/trace-context
250250
`parent-id/span-id`: `00f067aa0ba902b7`
251251
`trace-flags`: `01`
252252
253-
If we take a look at the request entry that was sent to Azure Monitor, we can see fields populated with the trace header information.
253+
If we take a look at the request entry that was sent to Azure Monitor, we can see fields populated with the trace header information. You can find this data under Logs(Analytics) in Azure Monitor Application Insights resource.
254254
255255
![Screenshot of request telemetry in Logs(Analytics) with trace header fields highlighted in red box](./media/opencensus-python/0011-correlation.png)
256256
@@ -288,6 +288,8 @@ When this code is run, we get the following in the console:
288288
```
289289
Observe how there is a spanId present for the log message that is within the span, which is the same spanId that belongs to the span named `hello`.
290290
291+
You can export the log data using the `AzureLogHandler`. More information can be found [here](https://docs.microsoft.com/azure/azure-monitor/app/opencensus-python#logs)
292+
291293
## Telemetry correlation in .NET
292294
293295
Over time, .NET defined several ways to correlate telemetry and diagnostics logs:
-13.2 KB
Loading

0 commit comments

Comments
 (0)