-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Can tracetest.SpanRecorder be a concrete type? #1164
Comments
Sorry about the delay. This sounds like a reasonable question and I think we can indeed make it a concrete type.
Yeah that was the idea. Additionally, there were some testing setups that used a map to capture completed span.
I think this is correct, we are likely over-abstracting. We could just build out the |
Also, if we do make this change, it probably goes without saying, but we sound rename the |
I'm working on this, but I just realized that Can we remove the |
@punya, this was under trace/tracetest when I filed the issue so you are right that it doesn't have to be stable at this point. |
In the tracetest package, we have a SpanRecorder interface and a standard implementation named "StandardSpanRecorder".
I was thinking about use cases where users would need to reimplement this interface. If the user want flexibility and want to collect these events in a custom way, they already have access to OnStart and OnEnd hooks. Are we providing the SpanRecorder interface in case user want to rely on a different implementation that doesn't buffer or have as much contention as the StandardSpanRecorder? But then, given this is a utility for testing, I wonder if we are overabstracting the recorder.
Any comments would be appreciated.
The text was updated successfully, but these errors were encountered: