rust-telemetry 1.3.0

Observability helpers originally developed for internal use at Famedly
# SPDX-FileCopyrightText: 2025 Famedly GmbH (info@famedly.com)
#
# SPDX-License-Identifier: Apache-2.0

[package]
name = "rust-telemetry"
version = "1.3.0"
authors = []
edition = "2024"
repository = "https://github.com/famedly/rust-telemetry"
resolver = "2"
license = "Apache-2.0"
description = "Observability helpers originally developed for internal use at Famedly"
# publish = ["famedly"]

[[bin]]
name = "gen-config-schema"
path = "src/gen_config_schema.rs"
required-features = ["schemars", "serde_yaml"]

[dependencies]
async-trait = { version = "^0.1.51" }
famedly_rust_utils = { version = "1.1.0", features = [
    "level_filter",
    "schemars",
] }
http = { version = "1.2.0" }
once_cell = { version = "1.20.2" }
opentelemetry = { version = "0.30.0" }
opentelemetry-appender-tracing = { version = "0.30.0" }
opentelemetry-otlp = { version = "0.30.0", features = ["grpc-tonic"] }
opentelemetry-semantic-conventions = { version = "0.30.0" }
opentelemetry_sdk = { version = "0.30.0", features = ["rt-tokio"] }
thiserror = "1.0.64"
tracing-opentelemetry = { version = "0.31.0" }
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "json"] }
tracing = "0.1.40"
serde = { version = "1.0.210", features = ["derive"] }
url = { version = "2.5.2", features = ["serde"] }
schemars = { version = "1.0.4", optional = true, features = ["url2"] }
serde_yaml = { version = "0.9.34", optional = true }

# tracing-error
tracing-error = { version = "0.2.1", optional = true }

# reqwest-middleware
opentelemetry-http = { version = "0.30.0", optional = true }
reqwest = { version = "0.13", optional = true }
reqwest-middleware = { version = "0.5.1", optional = true }

# axum
axum = { version = "^0.8", optional = true }
tower-otel-http-metrics = { version = "0.16.0", features = [
    "axum",
], optional = true }
opentelemetry-resource-detectors = "0.9.0"

[dev-dependencies]
tokio = { version = "1.43.0", features = ["full"] }

[features]
reqwest-middleware = [
    "dep:reqwest",
    "dep:reqwest-middleware",
    "dep:opentelemetry-http",
]
axum = ["dep:axum", "dep:tower-otel-http-metrics"]
schemars = ["dep:schemars", "famedly_rust_utils/schemars"]
tracing-error = ["dep:tracing-error"]

[lints.rust]
dead_code = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
trivial_casts = "allow"
trivial_numeric_casts = "warn"
unused_extern_crates = "warn"
unused_import_braces = "warn"
unused_qualifications = "warn"

[lints.clippy]
tabs_in_doc_comments = "allow"
branches_sharing_code = "warn"
cast_lossless = "warn"
cast_possible_wrap = "warn"
checked_conversions = "warn"
cloned_instead_of_copied = "warn"
create_dir = "warn"
dbg_macro = "warn"
default_trait_access = "warn"
expect_used = "warn"
expl_impl_clone_on_copy = "warn"
fallible_impl_from = "warn"
filetype_is_file = "warn"
filter_map_next = "warn"
flat_map_option = "warn"
float_cmp = "warn"
fn_params_excessive_bools = "warn"
fn_to_numeric_cast_any = "warn"
future_not_send = "warn"
if_then_some_else_none = "warn"
implicit_clone = "warn"
implicit_hasher = "warn"
implicit_saturating_sub = "warn"
imprecise_flops = "warn"
inefficient_to_string = "warn"
items_after_statements = "warn"
iter_not_returning_iterator = "warn"
large_digit_groups = "warn"
large_stack_arrays = "warn"
large_types_passed_by_value = "warn"
lossy_float_literal = "warn"
macro_use_imports = "warn"
manual_let_else = "warn"
manual_ok_or = "warn"
many_single_char_names = "warn"
map_unwrap_or = "warn"
mem_forget = "warn"
missing_const_for_fn = "warn"
missing_docs_in_private_items = "warn"
must_use_candidate = "warn"
mut_mut = "warn"
mutex_atomic = "warn"
needless_bitwise_bool = "warn"
non_send_fields_in_send_ty = "warn"
option_option = "warn"
path_buf_push_overwrite = "warn"
print_stderr = "warn"
print_stdout = "warn"
ptr_as_ptr = "warn"
range_minus_one = "warn"
range_plus_one = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
redundant_closure_for_method_calls = "warn"
ref_binding_to_reference = "warn"
ref_option_ref = "warn"
return_self_not_must_use = "warn"
same_functions_in_if_condition = "warn"
same_name_method = "warn"
semicolon_if_nothing_returned = "warn"
str_to_string = "warn"
string_to_string = "warn"
suboptimal_flops = "warn"
suspicious_operation_groupings = "warn"
too_many_lines = "warn"
trait_duplication_in_bounds = "warn"
trivially_copy_pass_by_ref = "warn"
type_repetition_in_bounds = "warn"
undocumented_unsafe_blocks = "warn"
unnested_or_patterns = "warn"
unreadable_literal = "warn"
unseparated_literal_suffix = "warn"
unused_async = "warn"
unused_self = "warn"
unwrap_used = "warn"
used_underscore_binding = "warn"
useless_let_if_seq = "warn"
verbose_file_reads = "warn"