From 77c422b21ad0b76fb2093cc3f228817a7e39b7af Mon Sep 17 00:00:00 2001 From: Benno van den Berg Date: Fri, 28 Jun 2024 14:45:03 -0700 Subject: [PATCH] Cleanup generated comments --- Cargo.lock | 31 +++++++++++++++++++ .../opentelemetry.proto.collector.trace.v1.rs | 2 +- .../otel/opentelemetry.proto.trace.v1.rs | 12 ++++--- xtask/Cargo.toml | 2 +- 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0567810b3..090bc4128 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1731,6 +1731,8 @@ dependencies = [ "prettyplease", "prost", "prost-types", + "pulldown-cmark", + "pulldown-cmark-to-cmark", "regex", "syn", "tempfile", @@ -1758,6 +1760,26 @@ dependencies = [ "prost", ] +[[package]] +name = "pulldown-cmark" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" +dependencies = [ + "bitflags 2.6.0", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "10.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0194e6e1966c23cc5fd988714f85b18d548d773e81965413555d96569931833d" +dependencies = [ + "pulldown-cmark", +] + [[package]] name = "quinn" version = "0.11.2" @@ -2863,6 +2885,15 @@ dependencies = [ "version_check", ] +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] + [[package]] name = "unicode-bidi" version = "0.3.15" diff --git a/fpx/src/models/otel/opentelemetry.proto.collector.trace.v1.rs b/fpx/src/models/otel/opentelemetry.proto.collector.trace.v1.rs index a1701d739..23b3c1854 100644 --- a/fpx/src/models/otel/opentelemetry.proto.collector.trace.v1.rs +++ b/fpx/src/models/otel/opentelemetry.proto.collector.trace.v1.rs @@ -27,7 +27,7 @@ pub struct ExportTraceServiceResponse { /// In such cases, the `rejected_` MUST have a value of `0` and /// the `error_message` MUST be non-empty. /// - /// A `partial_success` message with an empty value (rejected_ = 0 and + /// A `partial_success` message with an empty value (rejected\_ = 0 and /// `error_message` = "") is equivalent to it not being set/present. Senders /// SHOULD interpret it the same way as in the full success case. #[prost(message, optional, tag = "1")] diff --git a/fpx/src/models/otel/opentelemetry.proto.trace.v1.rs b/fpx/src/models/otel/opentelemetry.proto.trace.v1.rs index c80917c2c..97072ec85 100644 --- a/fpx/src/models/otel/opentelemetry.proto.trace.v1.rs +++ b/fpx/src/models/otel/opentelemetry.proto.trace.v1.rs @@ -149,10 +149,12 @@ pub struct Span { /// attributes is a collection of key/value pairs. Note, global attributes /// like server name can be set using the resource API. Examples of attributes: /// - /// "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" - /// "/http/server_latency": 300 - /// "example.com/myattribute": true - /// "example.com/score": 10.239 + /// ```text + /// "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" + /// "/http/server_latency": 300 + /// "example.com/myattribute": true + /// "example.com/score": 10.239 + /// ``` /// /// The OpenTelemetry API specification further restricts the allowed value types: /// @@ -390,7 +392,7 @@ pub mod status { /// a bit-mask. To extract the bit-field, for example, use an /// expression like: /// -/// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK) +/// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK) /// /// See for the flag definitions. /// diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 566217ca0..c523e72de 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -17,4 +17,4 @@ schemars = { workspace = true } fpx = { version = "0.1.0", path = "../fpx" } serde = { workspace = true } serde_json = { workspace = true } -tonic-build = { version = "0.11" } +tonic-build = { version = "0.11", features = ["cleanup-markdown"] }