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

opentelemetry-application-insights

OpenTelemetry exporter for Azure Application Insights

29 breaking releases

new 0.30.0 Mar 8, 2024
0.29.0 Nov 18, 2023
0.28.0 Oct 22, 2023
0.25.0 Mar 26, 2023
0.1.2 Jul 25, 2020

#73 in Debugging

Download history 1912/week @ 2023-11-21 3879/week @ 2023-11-28 5178/week @ 2023-12-05 3959/week @ 2023-12-12 1789/week @ 2023-12-19 695/week @ 2023-12-26 3121/week @ 2024-01-02 16276/week @ 2024-01-09 21844/week @ 2024-01-16 19497/week @ 2024-01-23 32022/week @ 2024-01-30 25311/week @ 2024-02-06 28298/week @ 2024-02-13 37496/week @ 2024-02-20 40936/week @ 2024-02-27 28021/week @ 2024-03-05

138,072 downloads per month
Used in axum-insights

MIT license

140KB
2.5K 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–43MB
~643K SLoC