-
Notifications
You must be signed in to change notification settings - Fork 36
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
Guidance needed for implementing tracing API #168
Comments
Some things to keep in mind:
With respect to the API you are trying to achieve:
I believe this answers your questions, loosely. I apologize for the brevity. It's hard to be succinct. I think the implementation of the linked function is the most succinct answer to your questions. Aside: I am on the fence about the current implementation of contexts and their use of zones. I've been collecting my thoughts and would like to open an issue and fish for feedback regarding changes to the implementation. But the changes, or reasons for the changes, don't feel very well fleshed out yet. Maybe I still open the issue though. Perhaps folks such as yourself can help clear up the fog where I'm struggling! |
Here's the issue I made on consolidating context APIs: #185 |
I am currently implementing a simplified tracing API for my uses, aiming to abstract away the complexities of manual span management. The goal is to get a straightforward API that allows me to start traces, end traces, and add subtraces without directly dealing with parent-child span relationships.
Here's what I am trying to achieve:
Start Trace: Initiates a new trace or a root span.
End Trace: Closes the currently active span and automatically manages the context to revert to the parent span.
Add Subtrace: Creates a new sub-span under the current active span.
I've encountered a challenge with the Span class, particularly in retrieving and managing the parent span when ending a trace. The current Span implementation exposes parentSpanId, but it doesn't provide direct access to the parent Span object, which is necessary to handle the thing properly.
Questions:
Is there an existing implementation or pattern within the library that supports this kind of API, specifically for managing the parent span relationship internally?
If such functionality is not currently available, is this normal because the lib is under development ? Am i missing something important ?
The text was updated successfully, but these errors were encountered: