Skip to content

Commit

Permalink
Remove deprecated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Jul 21, 2024
1 parent 901fde6 commit 70f6948
Showing 1 changed file with 0 additions and 78 deletions.
78 changes: 0 additions & 78 deletions src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,35 +591,6 @@ where
}
}

/// Sets whether or not span and event metadata should include OpenTelemetry
/// exception fields such as `exception.message` and `exception.backtrace`
/// when an `Error` value is recorded. If multiple error values are recorded
/// on the same span/event, only the most recently recorded error value will
/// show up under these fields.
///
/// These attributes follow the [OpenTelemetry semantic conventions for
/// exceptions][conv].
///
/// By default, these attributes are recorded.
/// Note that this only works for `(dyn Error + 'static)`.
/// See [Implementations on Foreign Types of tracing::Value][impls] or [`OpenTelemetryLayer::with_error_events_to_exceptions`]
///
/// [conv]: https://github.com/open-telemetry/semantic-conventions/tree/main/docs/exceptions/
/// [impls]: https://docs.rs/tracing/0.1.37/tracing/trait.Value.html#foreign-impls
#[deprecated(
since = "0.21.0",
note = "renamed to `OpenTelemetryLayer::with_error_fields_to_exceptions`"
)]
pub fn with_exception_fields(self, exception_fields: bool) -> Self {
Self {
sem_conv_config: SemConvConfig {
error_fields_to_exceptions: exception_fields,
..self.sem_conv_config
},
..self
}
}

/// Sets whether or not span and event metadata should include OpenTelemetry
/// exception fields such as `exception.message` and `exception.backtrace`
/// when an `Error` value is recorded. If multiple error values are recorded
Expand Down Expand Up @@ -680,35 +651,6 @@ where
}
}

/// Sets whether or not reporting an `Error` value on an event will
/// propagate the OpenTelemetry exception fields such as `exception.message`
/// and `exception.backtrace` to the corresponding span. You do not need to
/// enable `with_exception_fields` in order to enable this. If multiple
/// error values are recorded on the same span/event, only the most recently
/// recorded error value will show up under these fields.
///
/// These attributes follow the [OpenTelemetry semantic conventions for
/// exceptions][conv].
///
/// By default, these attributes are propagated to the span. Note that this only works for `(dyn Error + 'static)`.
/// See [Implementations on Foreign Types of tracing::Value][impls] or [`OpenTelemetryLayer::with_error_events_to_exceptions`]
///
/// [conv]: https://github.com/open-telemetry/semantic-conventions/tree/main/docs/exceptions/
/// [impls]: https://docs.rs/tracing/0.1.37/tracing/trait.Value.html#foreign-impls
#[deprecated(
since = "0.21.0",
note = "renamed to `OpenTelemetryLayer::with_error_records_to_exceptions`"
)]
pub fn with_exception_field_propagation(self, exception_field_propagation: bool) -> Self {
Self {
sem_conv_config: SemConvConfig {
error_records_to_exceptions: exception_field_propagation,
..self.sem_conv_config
},
..self
}
}

/// Sets whether or not reporting an `Error` value on an event will
/// propagate the OpenTelemetry exception fields such as `exception.message`
/// and `exception.backtrace` to the corresponding span. You do not need to
Expand Down Expand Up @@ -747,26 +689,6 @@ where
Self { location, ..self }
}

/// Sets whether or not span and event metadata should include OpenTelemetry
/// attributes with location information, such as the file, module and line number.
///
/// These attributes follow the [OpenTelemetry semantic conventions for
/// source locations][conv].
///
/// By default, locations are enabled.
///
/// [conv]: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attributes.md#source-code-attributes/
#[deprecated(
since = "0.17.3",
note = "renamed to `OpenTelemetrySubscriber::with_location`"
)]
pub fn with_event_location(self, event_location: bool) -> Self {
Self {
location: event_location,
..self
}
}

/// Sets whether or not spans metadata should include the _busy time_
/// (total time for which it was entered), and _idle time_ (total time
/// the span existed but was not entered).
Expand Down

0 comments on commit 70f6948

Please sign in to comment.