Skip to content

Commit 1986344

Browse files
authored
add docs to pre-commit, fix issues (#38)
1 parent 3425111 commit 1986344

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ repos:
2424
types: [rust]
2525
language: system
2626
pass_filenames: false
27-
- id: test
28-
name: Test
29-
entry: cargo test --all-features
27+
- id: docs
28+
name: Check docs
29+
entry: env RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
3030
types: [rust]
3131
language: system
3232
pass_filenames: false

src/exporters.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ macro_rules! feature_required {
2727
}};
2828
}
2929

30-
/// Build a [`SpanExporter`][opentelemetry_sdk::trace::SpanExporter] for passing to
30+
/// Build a [`SpanExporter`] for passing to
3131
/// [`with_additional_span_processor()`][crate::LogfireConfigBuilder::with_additional_span_processor].
3232
///
3333
/// This uses `OTEL_EXPORTER_OTLP_PROTOCOL` and `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL` environment
@@ -98,7 +98,7 @@ pub fn span_exporter(
9898
Ok(RemovePendingSpansExporter::new(span_exporter))
9999
}
100100

101-
/// Build a [`PushMetricExporter`][opentelemetry_sdk::metrics::exporter::PushMetricExporter] for passing to
101+
/// Build a [`PushMetricExporter`] for passing to
102102
/// [`with_metrics_options()`][crate::LogfireConfigBuilder::with_metrics_options].
103103
///
104104
/// This uses `OTEL_EXPORTER_OTLP_PROTOCOL` and `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL` environment

src/macros/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ macro_rules! debug {
200200
/// // or
201201
/// logfire::info!("Log with x = {x}, y = {y}", y = "hello", foo.bar = 42);
202202
/// ```
203+
///
204+
/// [attributes]: https://opentelemetry.io/docs/concepts/signals/traces/#attributes
203205
#[macro_export]
204206
macro_rules! log {
205207
(parent: $parent:expr, $level:expr, $format:expr $(, $($path:ident).+ = $value:expr)* $(,)?) => {

0 commit comments

Comments
 (0)