Skip to content

Commit 148eb22

Browse files
committed
docs: update description of special fields and semantic conventions
1 parent 1b3f7fd commit 148eb22

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@
2222
//! * `otel.name`: Override the span name sent to OpenTelemetry exporters.
2323
//! Setting this field is useful if you want to display non-static information
2424
//! in your span name.
25-
//! * `otel.kind`: Set the span kind to one of the supported OpenTelemetry [span kinds].
25+
//! * `otel.kind`: Set the span kind to one of the supported OpenTelemetry [span kinds]. These must
26+
//! be specified as strings such as `"client"` or `"server"`. If it is not specified, the span is
27+
//! assumed to be internal.
2628
//! * `otel.status_code`: Set the span status code to one of the supported OpenTelemetry [span status codes].
27-
//! * `otel.status_message`: Set the span status message.
29+
//! * `otel.status_description`: Set the span description of the status. This should be used only if
30+
//! `otel.status_code` is also set.
2831
//!
2932
//! [span kinds]: opentelemetry::trace::SpanKind
3033
//! [span status codes]: opentelemetry::trace::Status
@@ -33,7 +36,7 @@
3336
//!
3437
//! OpenTelemetry defines conventional names for attributes of common
3538
//! operations. These names can be assigned directly as fields, e.g.
36-
//! `trace_span!("request", "otel.kind" = %SpanKind::Client, "url.full" = ..)`, and they
39+
//! `trace_span!("request", "server.port" = 80, "url.full" = ..)`, and they
3740
//! will be passed through to your configured OpenTelemetry exporter. You can
3841
//! find the full list of the operations and their expected field names in the
3942
//! [semantic conventions] spec.

0 commit comments

Comments
 (0)