grow_better_stack_logs/
lib.rs1#![cfg_attr(docsrs, feature(doc_cfg))]
34
35pub mod core;
36
37mod client;
38mod config;
39mod encoding;
40mod exporter;
41mod http;
42mod otlp;
43mod query;
44
45#[cfg(feature = "blocking")]
46#[cfg_attr(docsrs, doc(cfg(feature = "blocking")))]
47pub mod blocking;
48
49#[cfg(feature = "testing")]
50#[cfg_attr(docsrs, doc(cfg(feature = "testing")))]
51pub mod testing;
52
53pub mod logging;
54
55pub use crate::core::{Error, ErrorCode, HealthStatus, Result, RetryPolicy, Secret};
56
57pub use crate::client::{BetterStackClient, BetterStackLogClient, LogClientOptions, LogProtocol};
58pub use crate::config::{
59 is_valid_identifier, normalize_base_url, BetterStackConfig, BetterStackConfigBuilder, Encoding,
60 DEFAULT_URL, VENDOR_QUERY_PASSWORD_VARS, VENDOR_QUERY_URL_VARS, VENDOR_QUERY_USERNAME_VARS,
61 VENDOR_SOURCE_TABLE_VARS, VENDOR_SOURCE_TOKEN_VARS, VENDOR_URL_VARS,
62};
63pub use crate::encoding::{
64 encode_event, encode_msgpack, encode_record, format_event_time, frame, to_better_stack_event,
65};
66pub use crate::exporter::{
67 BetterStackLogExporter, IngestExporterOptions, SendEventsOptions, MAX_RECORD_BYTES,
68 MAX_REQUEST_BYTES,
69};
70pub use crate::http::{
71 clickhouse_code, code_for_clickhouse, error_for_clickhouse, map_ingest_error, map_query_error,
72};
73pub use crate::otlp::{
74 encode_otlp_protobuf, otlp_json_request, parse_partial_success, BetterStackOtlpLogExporter,
75 OtlpExporterOptions, OtlpPartialSuccess, OtlpProtocol, DEFAULT_SCOPE_NAME, OTLP_LOGS_PATH,
76};
77pub use crate::query::{
78 escape_param_value, format_datetime64, json_escape, log_record_from_row, parse_datetime,
79 parse_rows, sql_string, BetterStackQuery, QueryOptions, QueryParam, QueryParams, QueryRow,
80 SearchLogsOptions, DEFAULT_SEARCH_LIMIT, MAX_SEARCH_LIMIT,
81};
82
83pub type BetterStackError = Error;