#open-telemetry #insight #applications #azure #tracing #exporter #microsoft-azure

opentelemetry-application-insights

OpenTelemetry exporter for Azure Application Insights

35 breaking releases

0.36.0 Oct 15, 2024
0.34.0 Jul 20, 2024
0.30.0 Mar 8, 2024
0.29.0 Nov 18, 2023
0.1.2 Jul 25, 2020

#74 in Debugging

Download history 40184/week @ 2024-07-18 30434/week @ 2024-07-25 31662/week @ 2024-08-01 32034/week @ 2024-08-08 27508/week @ 2024-08-15 31397/week @ 2024-08-22 25556/week @ 2024-08-29 29918/week @ 2024-09-05 29861/week @ 2024-09-12 29803/week @ 2024-09-19 32481/week @ 2024-09-26 30208/week @ 2024-10-03 32297/week @ 2024-10-10 34020/week @ 2024-10-17 33442/week @ 2024-10-24 31195/week @ 2024-10-31

137,159 downloads per month
Used in 2 crates (via axum-insights)

MIT license

165KB
3K SLoC

Crates.io Documentation Workflow Status

opentelemetry-application-insights

An Azure Application Insights exporter implementation for OpenTelemetry Rust.

Disclaimer: This is not an official Microsoft product.

Usage

Configure a OpenTelemetry pipeline using the Application Insights exporter and start creating spans (this example requires the opentelemetry-http/reqwest feature):

use opentelemetry::trace::Tracer as _;

fn main() {
    let connection_string = std::env::var("APPLICATIONINSIGHTS_CONNECTION_STRING").unwrap();
    let tracer = opentelemetry_application_insights::new_pipeline_from_connection_string(connection_string)
        .expect("valid connection string")
        .with_client(reqwest::blocking::Client::new())
        .install_simple();

    tracer.in_span("main", |_cx| {});
}

See documentation for more:

Application Insights integration

Thanks

Huge thanks goes to Denis Molokanov for the amazing appinsights crate. Check it out if you want a more direct integration with Application Insights.

Documentation

The only official documentation I could find is this one. Follow the links to see the data model and endpoint description.

Can I send telemetry to the Application Insights portal?

We recommend you use our SDKs and use the SDK API. There are variants of the SDK for various platforms. These SDKs handle buffering, compression, throttling, retries, and so on. However, the ingestion schema and endpoint protocol are public.

-- https://docs.microsoft.com/en-us/azure/azure-monitor/faq#can-i-send-telemetry-to-the-application-insights-portal

Dependencies

~4–37MB
~584K SLoC