-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Don't send task names as strings #462
Comments
Hi @hds, I am interested in implementing this feature. I believe we need to update the Field to expose the ID, as currently, we can only retrieve its name from the public API. Or have I misunderstood this feature? |
@hi-rustin that's correct, this change will require an upstream change in |
Thanks for your reply! I've submitted tokio-rs/tracing#2820. |
## Motivation Expose the index of the field in order to support cases such as sending field information by index instead of by the string name in Tokio Console. Details: tokio-rs/console#462 (comment) ## Solution Adds a new API which exposes the index of a field, which is how it is stored internally (together with a reference to the `FieldSet` containing the ordered field names. Signed-off-by: hi-rustin <[email protected]> Co-authored-by: Hayden Stainsby <[email protected]>
## Motivation Expose the index of the field in order to support cases such as sending field information by index instead of by the string name in Tokio Console. Details: tokio-rs/console#462 (comment) ## Solution Adds a new API which exposes the index of a field, which is how it is stored internally (together with a reference to the `FieldSet` containing the ordered field names. Signed-off-by: hi-rustin <[email protected]> Co-authored-by: Hayden Stainsby <[email protected]>
## Motivation Expose the index of the field in order to support cases such as sending field information by index instead of by the string name in Tokio Console. Details: tokio-rs/console#462 (comment) ## Solution Adds a new API which exposes the index of a field, which is how it is stored internally (together with a reference to the `FieldSet` containing the ordered field names. Signed-off-by: hi-rustin <[email protected]> Co-authored-by: Hayden Stainsby <[email protected]>
What problem are you trying to solve?
Currently task names are sent as strings to tokio-console (the instrumentation client).
Instead they should be sent as metadata and the field value should be sent as a reference to the metadata element. This will reduce the data sent over the wire, especially in cases where a task with a fixed name is repeatedly spawned.
See comment for reference: #452 (comment)
How should the problem be solved?
Send task names as metadata and reference the metadata in the spawn event.
The text was updated successfully, but these errors were encountered: