Comments (7)
From my personal experience in open source projects, for this kind of small project, I'll directly open a pull request to bootstrap the discussion. Although there are risks of going into a completely wrong direction and wasting time, I found it rather efficient to drive me and the reviewers to a better solution even if my first try is bad.
from minitrace-rust.
Thank you for bringing this up, the proposal looks petty neat to me. The current codebase is not intended to be this messy and mysterious... It's simply because I've put all ideas into it in one night and to prove they work, so the code structure was not seriously taken into consideration.
To leave some useful information for who is interested in refactoring the macro (I may do it months later if no one does it by that time), here is the original place where some of the codes are copied from:
- https://github.com/dtolnay/async-trait: for adding lifetime to arguments, when elaborating an
async fn
intofn -> impl Future
. - https://github.com/tokio-rs/tracing/blob/master/tracing-attributes/src/expand.rs: for detecting the
async fn
that is already transformed tofn -> impl Future
byasync-trait
. We've to distinguish it fromfn -> impl Future
that is written by the user because for the latter, we instrument it like normal fn instead ofasync fn
.
from minitrace-rust.
The reason why we've to elaborate async fn
into fn -> impl Future
is that, for an async fn foo()
, we have to instrument the Span::enter_with_local_parent
in the first call to foo()
, but not in the poll()
or .await
, because it's the only chance that local parent is prenent in the context.
from minitrace-rust.
I think to begin with it'll be baby steps:
- Restructure the code layout and introduce tests.
- Error reporting / UI
- Once some tests are in place would be to introduce a model, etc.
from minitrace-rust.
RFC is a generally great idea for such purpose. However with my current practice experience it may affect agility or hard to be followed until we find a good balance / standard about what should be tracked by a RFC.
I'm also thinking about a lighter way for summarize new changes which should be easier to be followed: always describe the change with more details in the issue + finalize ideas in the doc comment + verbose function comments. We should also have verbose comments for existing code bases.
What do you think?
from minitrace-rust.
Agreed. The main risk here is rejecting the whole pipeline idea. I don't propose the RFC be more detailed than what it is now, e.g. the Model is undefined/unspecified - it'll emerge, as you say small PR by small PR.
The goal is to keep the proc-macro working the whole time. I'll try do this by changing the code once it is covered by a test case, so related to #81.
So I believe we are agreed, this will not land with a big-bang single PR.
Rather smaller PRs will indicate how they are heading in the direction set out in this RFC.
Correct?
from minitrace-rust.
Voided by PR #127 rejection.
from minitrace-rust.
Related Issues (20)
- Panic with `AccessError` when logging in a `drop` HOT 2
- does not work in a thread HOT 1
- Integration test fails in test helper script HOT 2
- Request: panic instead of noop HOT 2
- Automatically create a root span if none is present. HOT 1
- is it possible to create multiple instances of the collector? HOT 10
- WASM (`wasm32-unknown-unknown`) support? HOT 12
- `minitrace-opentelemetry` doesn't work with `opentelemetry_zipkin` exporter HOT 3
- Feature request: Span property on #[trace] macro HOT 6
- Feature request: allow to use minitrace without global collector
- Panic on wasm: time not implemented on this platform HOT 5
- `Reporter::report` should be `async fn`? 🤔 HOT 4
- RFC: tokio-tracing compatible layer HOT 6
- Profile-Guided Optimization (PGO) benchmark results
- `LocalSpan::enter_with_parent` missing? HOT 9
- `futures::Stream` and `futures::Sink` instrumentation HOT 7
- Add span tags dynamically
- WASM target support improvements HOT 5
- [BUG] LocalSpan is broken in quick functions HOT 4
- loose strict dependency version for `opentelemetry` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minitrace-rust.