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

Span lifespan #82

Open
Som-Som-CC opened this issue Nov 12, 2024 · 1 comment
Open

Span lifespan #82

Som-Som-CC opened this issue Nov 12, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Som-Som-CC
Copy link
Collaborator

Som-Som-CC commented Nov 12, 2024

At client tracing spans are to be started when the request is to be sent and closed when the response arrived (or whatever way the request is terminated). The current implementation, however, creates and then closes the span immediately.

The reason arises from the old tracing mechanism, which just dealt with propagation and did no reporting using OpenTelemetry. Now instead of a string for logging a real a span object is to be created within the Do function, with its own close mechanism.

@Som-Som-CC Som-Som-CC added the bug Something isn't working label Nov 12, 2024
@Som-Som-CC Som-Som-CC self-assigned this Nov 12, 2024
@Som-Som-CC Som-Som-CC added enhancement New feature or request and removed bug Something isn't working labels Nov 13, 2024
@Som-Som-CC
Copy link
Collaborator Author

Som-Som-CC commented Nov 13, 2024

Since otelhttp.NewTransport transport is used at http.Client that does the instrumentation, we do not really need to care about span and its lifespan. So, this ticket is the other way around, no need in restful to create a new span when otel is used. A small code cleanup may be needed.

On the other hand, logging still uses span ID, so that requests and responses to be correlated. Other frameworks log request and response together. But that means that request logging is not in line with the other logs an app prints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant