All Projects → dmolokanov → appinsights-rs

dmolokanov / appinsights-rs

Licence: MIT license
Application Insights SDK for Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to appinsights-rs

ApplicationInsights-Ruby
Microsoft Application Insights SDK for Ruby
Stars: ✭ 30 (+3.45%)
Mutual labels:  application-insights, telemetry
Applicationinsights Dotnet
ApplicationInsights-dotnet
Stars: ✭ 367 (+1165.52%)
Mutual labels:  application-insights, telemetry
arcus.observability
Observability with Microsoft Azure in a breeze.
Stars: ✭ 24 (-17.24%)
Mutual labels:  application-insights, telemetry
Haystack
Top level repository for Haystack, containing documentation and deployment scripts
Stars: ✭ 261 (+800%)
Mutual labels:  telemetry, tracing
Applicationinsights Python
Application Insights SDK for Python
Stars: ✭ 114 (+293.1%)
Mutual labels:  application-insights, telemetry
Orchard-Azure-Application-Insights
This Orchard CMS module enables easy integration of Azure Application Insights telemetry into Orchard. Useful for Azure-based cloud hsoting.
Stars: ✭ 17 (-41.38%)
Mutual labels:  application-insights, telemetry
Applicationinsights Aspnetcore
ASP.NET Core web applications monitoring
Stars: ✭ 306 (+955.17%)
Mutual labels:  application-insights, telemetry
Applicationinsights Php
Azure Application Insights SDK for PHP
Stars: ✭ 98 (+237.93%)
Mutual labels:  application-insights, telemetry
Applicationinsights Go
Microsoft Application Insights SDK for Go
Stars: ✭ 113 (+289.66%)
Mutual labels:  application-insights, telemetry
Applicationinsights Dotnet Logging
.NET Logging adaptors
Stars: ✭ 100 (+244.83%)
Mutual labels:  application-insights, telemetry
Applicationinsights Home
Application Insights main repository for documentation of overall SDK offerings for all platforms.
Stars: ✭ 221 (+662.07%)
Mutual labels:  application-insights, telemetry
Applicationinsights Dotnet Server
Microsoft Application Insights for .NET Web Applications
Stars: ✭ 130 (+348.28%)
Mutual labels:  application-insights, telemetry
iopipe-python
Python agent for AWS Lambda metrics, tracing, profiling & analytics
Stars: ✭ 77 (+165.52%)
Mutual labels:  telemetry, tracing
cpp client telemetry
1DS C++ SDK
Stars: ✭ 62 (+113.79%)
Mutual labels:  telemetry
lambda-python
SignalFx AWS Lambda Python Wrapper
Stars: ✭ 15 (-48.28%)
Mutual labels:  tracing
kamon-http4s
Kamon Integration for http4s
Stars: ✭ 47 (+62.07%)
Mutual labels:  tracing
Samples
Sample applications using App.Metrics
Stars: ✭ 19 (-34.48%)
Mutual labels:  application-insights
kamon-akka
Kamon Instrumentation for Akka
Stars: ✭ 44 (+51.72%)
Mutual labels:  tracing
Petabridge.Tracing.ApplicationInsights
OpenTracing adapter for Microsoft Application Insights
Stars: ✭ 30 (+3.45%)
Mutual labels:  application-insights
ESP32
DroneBridge for ESP32. A short range wifi based telemetry link. Support for MAVLink, MSP & LTM (iNAV).
Stars: ✭ 183 (+531.03%)
Mutual labels:  telemetry

Application Insights for Rust

build-status crate-status docs-status dependabot-status

This project provides a Rust SDK for Application Insights. Application Insights is an APM service that helps to monitor running applications. This Rust crate allows to send various kinds of telemetry information to the server to be visualized later on Azure Portal.

🚩 Disclaimer
This project is not an officially recognized Microsoft product and is not an endorsement of any future product offering from Microsoft.

Microsoft and Azure are registered trademarks of Microsoft Corporation.

Installation

$ cargo add appinsights

or just add this to your Cargo.toml:

[dependencies]
appinisghts = "0.2"

Usage

To start tracking telemetry for your application first thing you need to do is to obtain an Instrumentation Key and initialize TelemetryClient with it.

This client will be used to send all telemetry data to Application Insights. This SDK doesn't collect any telemetry automatically, so this client should be used everywhere in the code to report health information about an application.

use appinsights::TelemetryClient;

#[tokio::main]
async fn main() {
    // configure telemetry client with default settings
    let client = TelemetryClient::new("<instrumentation key>".to_string());
    
    // send event telemetry to the Application Insights server
    client.track_event("application started");

    // stop the client
    client.close_channel().await;
}

If you need more control over the client's behavior, you can create a new instance of TelemetryConfig and initialize a TelemetryClient with it.

use std::time::Duration;
use appinsights::{TelemetryClient, TelemetryConfig};
use appinsights::telemetry::SeverityLevel;

#[tokio::main]
async fn main() {
    // configure telemetry config with custom settings
    let config = TelemetryConfig::builder()
        // provide an instrumentation key for a client
        .i_key("<instrumentation key>")
        // set a new maximum time to wait until data will be sent to the server
        .interval(Duration::from_secs(5))
        // construct a new instance of telemetry configuration
        .build();

    // configure telemetry client with default settings
    let client = TelemetryClient::from_config(config);

    // send trace telemetry to the Application Insights server
    client.track_trace("A database error occurred", SeverityLevel::Warning);

    // stop the client
    client.close_channel().await;
}

License

This project is licensed under the terms of the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].