flareapp-core 0.1.0

The core of the Flare client: config, the client, and the worker thread that sends data.
Documentation
//! The core of the Flare client: the config, the client, and the worker thread that
//! sends data to Flare.
//!
//! Applications use the `flareapp` crate, which re-exports what they need from
//! here. Integrations, like the `tracing` integration, use this crate to send their
//! data through the global [`Client`].
//!
//! This crate has no HTTP client of its own. The config needs a [`Transport`]. The
//! `flareapp` crate sets a default transport.

mod client;
mod config;
mod debug;
mod dotenv;
mod entry_point;
mod level;
mod log_line;
mod process;
mod report;
mod resource;
mod scope;
mod source_path;
mod time;
mod transport;
mod worker;

/// Test helpers for the integration crates. Not part of the public API.
#[cfg(any(test, feature = "testing"))]
#[doc(hidden)]
pub mod test_support;

pub use client::{
    Client, Guard, QueuedReport, StartError, active_client, current, flush, init, is_worker_thread,
    set_report_listener,
};
pub use config::{Config, OtlpProtocol};
pub use entry_point::EntryPoint;
#[doc(hidden)]
pub use entry_point::{
    SpanEntryPoint, WebRequest, current_span_entry_point, resolve_entry_point, web_entry_point,
};
pub use level::Level;
pub use log_line::{LogLine, LoggedError, Targets, TraceContext};
#[doc(hidden)]
pub use process::executable_name;
pub use process::{command_args, command_line};
pub use report::{
    DebugImage, Frame, Report, ReportId, ResolveFrames, StackTrace, erased_exception_class,
};
#[doc(hidden)]
pub use scope::with_nested_entry_point;
pub use scope::{
    Scope, ScopeFutureExt, User, WithScope, add_log_breadcrumb, configure_scope, glow, with_scope,
};
#[doc(hidden)]
pub use source_path::{
    file_crate_name, is_application_file, is_dependency, is_flare_crate, workspace_root,
};
pub use transport::{Request, Response, Signal, Transport, TransportError};

/// The name this SDK reports as `telemetry.sdk.name` and in the OTLP scope.
const SDK_NAME: &str = "flareapp";

/// The version of the Flare crates. All crates in this workspace share it.
const SDK_VERSION: &str = env!("CARGO_PKG_VERSION");