Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: rename Subscriber to Collect #1015

Merged
merged 56 commits into from
Oct 22, 2020
Merged

Conversation

davidbarsky
Copy link
Member

@davidbarsky davidbarsky commented Oct 4, 2020

This PR renames the following:

  • tracing_core::Subscriber to tracing_core::Collect
  • tracing_subscriber::layer::Layer to tracing_subscriber::layer::Subscribe
  • Most types that implement tracing_core::Subscriber have been renamed to the Collector-based naming scheme
  • Most types that implement tracing_subscriber::Layer have been renamed to the Subscriber-based naming scheme

Resolves #641.

@davidbarsky davidbarsky requested a review from hawkw October 4, 2020 20:06
@davidbarsky davidbarsky marked this pull request as ready for review October 8, 2020 20:40
@davidbarsky davidbarsky requested review from jtescher, yaahc and a team as code owners October 8, 2020 20:40
@hawkw
Copy link
Member

hawkw commented Oct 9, 2020

This currently has conflicts with master, can I get you to fix that up?

# Conflicts:
#	tracing-core/src/callsite.rs
#	tracing-core/src/collector.rs
#	tracing-core/src/dispatcher.rs
#	tracing-core/src/lib.rs
#	tracing-subscriber/src/lib.rs
#	tracing/src/dispatcher.rs
#	tracing/src/lib.rs
#	tracing/src/subscriber.rs
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you know what? if this builds, it's fine. let's just do it. we'll fix any remaining docs weirdness later.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@davidbarsky davidbarsky merged commit 98ba44c into master Oct 22, 2020
@davidbarsky davidbarsky deleted the davidbarsky/rename-subscriber branch October 22, 2020 19:11
hawkw pushed a commit that referenced this pull request Oct 22, 2020
This PR removes the deprecated items in `tracing-subscriber`. It _does
not_ remove `Collect::drop_span` as that will happen in a separate PR.
Note that branch builds atop of #1015, which means:

- #1015 needs to be merged first
- This PR will be rebased against the master branch containing #1015.
- _Then_ this can safely be merged.
dvdplm added a commit to dvdplm/tracing that referenced this pull request Oct 23, 2020
* upstream/master:
  subscriber: update sharded-slab to 0.1, pool hashmap allocations (tokio-rs#1062)
  subscriber: remove deprecated type, structs, and methods tokio-rs#1030
  core: rename Subscriber to Collect (tokio-rs#1015)
  chore: fix rustdoc warning in tracing-subscriber (tokio-rs#1061)
dvdplm added a commit to dvdplm/tracing that referenced this pull request Oct 23, 2020
* dp-target-is-cow:
  subscriber: update sharded-slab to 0.1, pool hashmap allocations (tokio-rs#1062)
  subscriber: remove deprecated type, structs, and methods tokio-rs#1030
  core: rename Subscriber to Collect (tokio-rs#1015)
  chore: fix rustdoc warning in tracing-subscriber (tokio-rs#1061)
dvdplm added a commit to dvdplm/tracing that referenced this pull request Oct 23, 2020
…spatch-as-owned-tokio-rs#455

* upstream/master:
  subscriber: update sharded-slab to 0.1, pool hashmap allocations (tokio-rs#1062)
  subscriber: remove deprecated type, structs, and methods tokio-rs#1030
  core: rename Subscriber to Collect (tokio-rs#1015)
  chore: fix rustdoc warning in tracing-subscriber (tokio-rs#1061)
dvdplm added a commit to dvdplm/tracing that referenced this pull request Oct 23, 2020
A few minor things left over from tokio-rs#1015, there are possibly a few more (`ErrorLayer` in `tracing-error`?).
davidbarsky pushed a commit that referenced this pull request Oct 27, 2020
The changes were in tests, tracing-error, and example.
salewski added a commit to salewski/tracing-rs that referenced this pull request Nov 20, 2020
The trait being augmented is the 'Collect' trait, so name the trait
that extends it 'CollectExt'.

This is in keeping with the extension trait naming conventions
documented in Rust RFC-445, and also with the spirit of the
discussion in tokio-rs/tracing PR tokio-rs#1015.
salewski added a commit to salewski/tracing-rs that referenced this pull request Nov 20, 2020
The trait being augmented is the 'Collect' trait, so name the trait
that extends it 'CollectExt'.

This is in keeping with the extension trait naming conventions
documented in Rust RFC-445, and also with the spirit of the
discussion in tokio-rs/tracing PR tokio-rs#1015.
salewski added a commit to salewski/tracing-rs that referenced this pull request Nov 20, 2020
The trait being augmented is the 'Collect' trait, so name the trait
that extends is 'CollectExt'.

This is in keeping with the extension trait naming conventions
documented in Rust RFC-445, and also with the spirit of the
discussion in tokio-rs/tracing PR tokio-rs#1015.
salewski added a commit to salewski/tracing-rs that referenced this pull request Nov 20, 2020
The trait being augmented is the 'Collect' trait, so name the trait
that extends it is 'CollectExt'.

This is in keeping with the extension trait naming conventions
documented in Rust RFC-445, and also with the spirit of the
discussion in tokio-rs/tracing PR tokio-rs#1015.
davidbarsky pushed a commit that referenced this pull request Nov 21, 2020
The trait being augmented is the 'Collect' trait, so name the trait
that extends should be called 'CollectExt'.

This is in keeping with the extension trait naming conventions
documented in RFC 445 and the spirit of the discussion in
tokio-rs/tracing PR #1015.
bobrik added a commit to bobrik/tracing that referenced this pull request Jan 14, 2021
It was renamed everywhere in tokio-rs#1015, but until tokio-rs#1190 it wasn't possible
to enter this macro branch. Now it fails with the following:

```
   Compiling tracing v0.2.0 (/Users/ivan/projects/tracing/tracing)
error[E0433]: failed to resolve: maybe a missing crate `dispatcher`?
    --> /Users/ivan/projects/tracing/tracing/src/macros.rs:2351:21
     |
2351 |           if !$crate::dispatcher::has_been_set() {
     |                       ^^^^^^^^^^ maybe a missing crate `dispatcher`?
```
hawkw added a commit that referenced this pull request Jan 27, 2021
It was renamed everywhere in #1015, but until #1190 it wasn't possible
to enter this macro branch. Now it fails with the following:

```
   Compiling tracing v0.2.0 (/Users/ivan/projects/tracing/tracing)
error[E0433]: failed to resolve: maybe a missing crate `dispatcher`?
    --> /Users/ivan/projects/tracing/tracing/src/macros.rs:2351:21
     |
2351 |           if !$crate::dispatcher::has_been_set() {
     |                       ^^^^^^^^^^ maybe a missing crate `dispatcher`?
```

Co-authored-by: Eliza Weisman <eliza@buoyant.io>
Folyd added a commit to Folyd/tracing that referenced this pull request Feb 5, 2021
Folyd added a commit to Folyd/tracing that referenced this pull request Feb 5, 2021
Folyd added a commit to Folyd/tracing that referenced this pull request Mar 1, 2021
Folyd added a commit to Folyd/tracing that referenced this pull request Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename tracing_subscriber::layer::Layer to something closer to Subscriber.
4 participants