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

feat: Expose resource stats in traces as separate event #1973

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

disq
Copy link
Member

@disq disq commented Nov 20, 2024

Looks like:
Screenshot 2024-11-20 at 11 30 09

@disq disq requested a review from a team as a code owner November 20, 2024 11:03
@disq disq requested review from ronsh12 and erezrokah and removed request for ronsh12 November 20, 2024 11:03
@github-actions github-actions bot added the feat label Nov 20, 2024
@github-actions github-actions bot added feat and removed feat labels Nov 20, 2024
@@ -80,6 +80,13 @@ func (w *worker) resolveTable(ctx context.Context, table *schema.Table, client s
logger.Info().Msg("top level table resolver started")
}
tableMetrics := w.metrics.TableClient[table.Name][clientName]
defer func() {
span.AddEvent("sync.finish.stats", trace.WithAttributes(
Copy link
Member Author

@disq disq Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out you can also do span.SetAttributes(...) but having a separate "finish event" (with the stats attached, we already know when the span ended otherwise) is better.

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

Successfully merging this pull request may close these issues.

2 participants