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
An [Azure Application Insights](https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview) exporter implementation for [OpenTelemetry Rust](https://github.com/open-telemetry/opentelemetry-rust).
11
8
12
9
**Disclaimer**: This is not an official Microsoft product.
13
10
14
11
## Usage
15
12
16
-
Configure a OpenTelemetry pipeline using the Application Insights exporter and start creating
17
-
spans (this example requires the **reqwest-client-blocking** feature):
13
+
Configure a OpenTelemetry pipeline using the Application Insights exporter and start creating spans (this example requires the **reqwest-client** feature):
18
14
19
-
```rust
15
+
```rust,no_run
20
16
use opentelemetry::trace::Tracer as _;
21
17
22
18
fn main() {
@@ -29,213 +25,24 @@ fn main() {
29
25
}
30
26
```
31
27
32
-
### Simple or Batch
33
-
34
-
The functions `build_simple` and `install_simple` build/install a trace pipeline using the
35
-
simple span processor. This means each span is processed and exported synchronously at the time
36
-
it ends.
37
-
38
-
The functions `build_batch` and `install_batch` use the batch span processor instead. This
39
-
means spans are exported periodically in batches, which can be better for performance. This
40
-
feature requires an async runtime such as Tokio or async-std. If you decide to use a batch span
41
-
processor, make sure to call `opentelemetry::global::shutdown_tracer_provider()` before your
42
-
program exits to ensure all remaining spans are exported properly (this example requires the
43
-
**reqwest-client** and **opentelemetry/rt-tokio** features).
-[Simple or Batch](https://docs.rs/opentelemetry-application-insights/latest/opentelemetry_application_insights/#simple-or-batch)
31
+
-[Async runtimes and HTTP clients](https://docs.rs/opentelemetry-application-insights/latest/opentelemetry_application_insights/#async-runtimes-and-http-clients)
Huge thanks goes to [Denis Molokanov](https://github.com/dmolokanov) for the amazing [appinsights](https://github.com/dmolokanov/appinsights-rs) crate. Check it out if you want a more direct integration with Application Insights.
223
39
224
40
### Documentation
225
41
226
-
The only official documentation I could find is this one. Follow the links to
227
-
see the data model and endpoint description.
42
+
The only official documentation I could find is this one. Follow the links to see the data model and endpoint description.
228
43
229
44
> Can I send telemetry to the Application Insights portal?
230
45
>
231
-
> We recommend you use our SDKs and use the [SDK API]. There are variants of
232
-
> the SDK for various [platforms]. These SDKs handle buffering, compression,
233
-
> throttling, retries, and so on. However, the [ingestion schema] and [endpoint
234
-
> protocol] are public.
46
+
> We recommend you use our SDKs and use the [SDK API](https://docs.microsoft.com/en-us/azure/azure-monitor/app/api-custom-events-metrics). There are variants of the SDK for various [platforms](https://docs.microsoft.com/en-us/azure/azure-monitor/app/platforms). These SDKs handle buffering, compression, throttling, retries, and so on. However, the [ingestion schema](https://github.com/microsoft/ApplicationInsights-dotnet/tree/master/BASE/Schema/PublicSchema) and [endpoint protocol](https://github.com/Microsoft/ApplicationInsights-Home/blob/master/EndpointSpecs/ENDPOINT-PROTOCOL.md) are public.
0 commit comments