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

chore: big pile of backports #1214

Merged
merged 6 commits into from
Jan 28, 2021
Merged

chore: big pile of backports #1214

merged 6 commits into from
Jan 28, 2021

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Jan 28, 2021

This backports several changes from master to v0.1.x:

Since these have all been approved on master, I'm going to just go ahead
and merge this when CI passes.

taiki-e and others added 3 commits January 28, 2021 09:30
This avoids relatively heavy dependencies (`tracing-attributes`, `syn`,
etc.) in some cases.
## Motivation

From the readme

> (if you're the maintainer of a tracing ecosystem crate not in this list, please let us know!)

## Solution

Added links to tracing-elastic-apm.

Co-authored-by: Eliza Weisman <eliza@buoyant.io>
Currently, when the `log` feature is enabled but the `log-always`
feature is not, we check the (dynamic, but inexpensive)
`dispatch::has_been_set` variable **before** checking if the event's
level would be enabled by `log`'s static max level features.

Although this check is not terribly costly in terms of performance, it
*does* result in code being generated even when the `log` crate disables
some levels statically. This means that we will always generate *some*
code when the `log` feature is disabled. This isn't ideal --- the static
max level features should result in us generating *no* code whatsoever
for disabled trace points.

This commit moves the static max level check outside of the dispatch
check. Now, we should generate 0 bytes of assembly when both `log` and
`tracing` disable an event with their static filtering features.

I've also updated the docs to explain the relationship between `tracing`
and `log`'s separate static filtering.

Fixes #1174

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw hawkw changed the base branch from master to v0.1.x January 28, 2021 17:37
davidpdrsn and others added 3 commits January 28, 2021 09:54
* Add sample implementation of `FormatEvent`

The docs previously didn't provide much help implementing `FormatEvent`.
Especially getting access to fields on spans could be tricky unless the
user was aware of `FormattedFields`.

This updates the docs with a basic, but working, example.

* Apply suggestions from code review

Co-authored-by: Eliza Weisman <eliza@buoyant.io>

* Add comment explaining what `FormattedFields` is

* Expand docs a bit

* Fix formatting

Co-authored-by: Eliza Weisman <eliza@buoyant.io>
Updates the requirements on [pin-project](https://github.com/taiki-e/pin-project) to permit the latest version.
- [Release notes](https://github.com/taiki-e/pin-project/releases)
- [Changelog](https://github.com/taiki-e/pin-project/blob/master/CHANGELOG.md)
- [Commits](taiki-e/pin-project@v0.4.0...v1.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw hawkw merged commit 672b175 into v0.1.x Jan 28, 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.

4 participants