Skip to content

Commit a74db51

Browse files
authored
Merge branch 'main' into feat/remove-global-trace-shutdown
2 parents 07dea1e + a3c469b commit a74db51

File tree

13 files changed

+8
-17
lines changed

13 files changed

+8
-17
lines changed

opentelemetry-appender-tracing/src/layer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl<'a, LR: LogRecord> EventVisitor<'a, LR> {
6969
}
7070
}
7171

72-
impl<'a, LR: LogRecord> tracing::field::Visit for EventVisitor<'a, LR> {
72+
impl<LR: LogRecord> tracing::field::Visit for EventVisitor<'_, LR> {
7373
fn record_debug(&mut self, field: &tracing::field::Field, value: &dyn std::fmt::Debug) {
7474
#[cfg(feature = "experimental_metadata_attributes")]
7575
if is_duplicated_metadata(field.name()) {

opentelemetry-http/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use opentelemetry::propagation::{Extractor, Injector};
1313
/// for example usage.
1414
pub struct HeaderInjector<'a>(pub &'a mut http::HeaderMap);
1515

16-
impl<'a> Injector for HeaderInjector<'a> {
16+
impl Injector for HeaderInjector<'_> {
1717
/// Set a key and value in the HeaderMap. Does nothing if the key or value are not valid inputs.
1818
fn set(&mut self, key: &str, value: String) {
1919
if let Ok(name) = http::header::HeaderName::from_bytes(key.as_bytes()) {
@@ -30,7 +30,7 @@ impl<'a> Injector for HeaderInjector<'a> {
3030
/// for example usage.
3131
pub struct HeaderExtractor<'a>(pub &'a http::HeaderMap);
3232

33-
impl<'a> Extractor for HeaderExtractor<'a> {
33+
impl Extractor for HeaderExtractor<'_> {
3434
/// Get a value for a key from the HeaderMap. If the value is not valid ASCII, returns None.
3535
fn get(&self, key: &str) -> Option<&str> {
3636
self.0.get(key).and_then(|value| value.to_str().ok())

opentelemetry-sdk/src/export/logs/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ impl<'a> LogBatch<'a> {
3939
///
4040
/// Note - this is not a public function, and should not be used directly. This would be
4141
/// made private in the future.
42-
4342
pub fn new(data: &'a [(&'a LogRecord, &'a InstrumentationScope)]) -> LogBatch<'a> {
4443
LogBatch { data }
4544
}

opentelemetry-sdk/src/metrics/meter_provider.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ impl MeterProviderBuilder {
256256
}
257257

258258
/// Construct a new [MeterProvider] with this configuration.
259-
260259
pub fn build(self) -> SdkMeterProvider {
261260
otel_debug!(
262261
name: "MeterProvider.Building",

opentelemetry-sdk/src/testing/logs/in_memory_exporter.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ use std::sync::{Arc, Mutex};
2929
/// .build();
3030
/// // Setup Log Appenders and emit logs. (Not shown here)
3131
/// logger_provider.force_flush();
32-
3332
/// let emitted_logs = exporter.get_emitted_logs().unwrap();
3433
/// for log in emitted_logs {
3534
/// println!("{:?}", log);

opentelemetry-sdk/src/trace/sampler/jaeger_remote/remote.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/// Generate types based on proto
2-
32
/// ProbabilisticSamplingStrategy samples traces with a fixed probability.
43
#[derive(serde::Serialize, serde::Deserialize, PartialOrd, PartialEq)]
54
#[serde(rename_all = "camelCase")]

opentelemetry-sdk/src/trace/span_limit.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
///
1313
/// If the limit has been breached. The attributes, events or links will be dropped based on their
1414
/// index in the collection. The one added to collections later will be dropped first.
15-
1615
pub(crate) const DEFAULT_MAX_EVENT_PER_SPAN: u32 = 128;
1716
pub(crate) const DEFAULT_MAX_ATTRIBUTES_PER_SPAN: u32 = 128;
1817
pub(crate) const DEFAULT_MAX_LINKS_PER_SPAN: u32 = 128;

opentelemetry-semantic-conventions/scripts/templates/registry/rust/metric.rs.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
{% set req_level = "Unspecified" %}
5858
{% set req_message = '' %}
5959
{% endif %}
60-
/// | [`crate::attribute::{{ attribute.name | screaming_snake_case }}`] | `{{ req_level }}`{{ (': ' + req_message if req_message else '') }}
60+
/// | [`crate::attribute::{{ attribute.name | screaming_snake_case }}`] | `{{ req_level }}`{{ (': ' + req_message.replace('\n', ' ') if req_message else '') }}
6161
{% endfor %}
6262
{% if metric.examples %}
6363
///

opentelemetry-semantic-conventions/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#![doc(
1515
html_logo_url = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-rust/main/assets/logo.svg"
1616
)]
17+
//TODO - remove once there are no empty lines after doc comments in the templates.
18+
#![allow(clippy::empty_line_after_doc_comments)]
1719

1820
pub mod attribute;
1921
pub mod metric;

opentelemetry-semantic-conventions/src/metric.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,10 +626,8 @@ pub const DB_CLIENT_CONNECTIONS_WAIT_TIME: &str = "db.client.connections.wait_ti
626626
/// | Name | Requirement |
627627
/// |:-|:- |
628628
/// | [`crate::attribute::DB_COLLECTION_NAME`] | `Conditionally_required`: If readily available. The collection name MAY be parsed from the query text, in which case it SHOULD be the first collection name in the query.
629-
630629
/// | [`crate::attribute::DB_NAMESPACE`] | `Conditionally_required`: If available.
631630
/// | [`crate::attribute::DB_OPERATION_NAME`] | `Conditionally_required`: If readily available. The operation name MAY be parsed from the query text, in which case it SHOULD be the first operation name found in the query.
632-
633631
/// | [`crate::attribute::DB_RESPONSE_STATUS_CODE`] | `Conditionally_required`: If the operation failed and status code is available.
634632
/// | [`crate::attribute::DB_SYSTEM`] | `Required`
635633
/// | [`crate::attribute::ERROR_TYPE`] | `Conditionally_required`: If and only if the operation failed.

opentelemetry/src/global/internal_logging.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
/// **internally within OpenTelemetry code** or for **custom exporters and processors**. They are not designed
55
/// for general application logging and should not be used for that purpose.
66
///
7-
87
/// Macro for logging informational messages in OpenTelemetry.
98
///
109
/// # Fields:
@@ -17,10 +16,8 @@
1716
/// otel_info!(name: "sdk_start", version = "1.0.0", schema_url = "http://example.com");
1817
/// ```
1918
///
20-
2119
// TODO: Remove `name` attribute duplication in logging macros below once `tracing::Fmt` supports displaying `name`.
2220
// See issue: https://github.com/tokio-rs/tracing/issues/2774
23-
2421
#[macro_export]
2522
macro_rules! otel_info {
2623
(name: $name:expr $(,)?) => {

opentelemetry/src/logs/logger.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use crate::{logs::LogRecord, InstrumentationScope};
66
use super::Severity;
77

88
/// The interface for emitting [`LogRecord`]s.
9-
109
pub trait Logger {
1110
/// Specifies the `LogRecord` type associated with this logger.
1211
type LogRecord: LogRecord;

opentelemetry/src/metrics/instruments/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl<'a, T> HistogramBuilder<'a, T> {
113113
}
114114
}
115115

116-
impl<'a> HistogramBuilder<'a, Histogram<f64>> {
116+
impl HistogramBuilder<'_, Histogram<f64>> {
117117
/// Creates a new instrument.
118118
///
119119
/// Validates the instrument configuration and creates a new instrument. In
@@ -124,7 +124,7 @@ impl<'a> HistogramBuilder<'a, Histogram<f64>> {
124124
}
125125
}
126126

127-
impl<'a> HistogramBuilder<'a, Histogram<u64>> {
127+
impl HistogramBuilder<'_, Histogram<u64>> {
128128
/// Creates a new instrument.
129129
///
130130
/// Validates the instrument configuration and creates a new instrument. In

0 commit comments

Comments
 (0)