tracing icon indicating copy to clipboard operation
tracing copied to clipboard

attributes: remove default level for instrument attribute macro

Open psinghal20 opened this issue 4 years ago • 5 comments

This PR removes the default level for the #[instrument] attribute macro, forcing the user to explicitly specify the logging level.

Fixes #1070

Motivation

As mentioned in the associated issue, the default value of the tracing level might have performance and users should be aware of the tracing level they are opting for the performance impact it can have. Whatever default we pick might not work for some and might surprise some people. Making the level explicit allows users to make a conscious choice.

Solution

This PR adds a complie_error in case no tracing level is specified by the user.

I have made most of the documentation and test changes required. Please let me know if I missed some.

psinghal20 avatar Nov 25 '20 21:11 psinghal20

Is this still something we want to merge @hawkw ?

bryangarza avatar May 06 '22 00:05 bryangarza

@bryangarza it looks like a large number of merge conflicts need to be resolved.

hawkw avatar May 06 '22 02:05 hawkw

Thanks, yeah I wasn’t sure if it was still a change we wanted. Sounds good!

bryangarza avatar May 06 '22 19:05 bryangarza

Since this is going to start introducing compile errors, I set the tracing-attributes 0.2 milestone.

We'll also need to fix the merge conflicts at some point.

bryangarza avatar May 09 '22 23:05 bryangarza

Since this is going to start introducing compile errors, I set the tracing-attributes 0.2 milestone.

That's correct, this should be merged to the master branch for v0.2, as it's a breaking change. Thus far, I've put it off because actually merging the breaking change will make backporting more annoying.

hawkw avatar May 09 '22 23:05 hawkw