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

Add context to spanstore.Writer interface #2006

Closed
vprithvi opened this issue Jan 6, 2020 · 2 comments
Closed

Add context to spanstore.Writer interface #2006

vprithvi opened this issue Jan 6, 2020 · 2 comments

Comments

@vprithvi
Copy link
Contributor

vprithvi commented Jan 6, 2020

Problem - what in Jaeger blocks you from solving the requirement?

type Writer interface {
WriteSpan(span *model.Span) error
}

The spanstore.Writer interface does not propagate context.

Proposal - what do you suggest to solve the problem or improve the existing situation?

Add a new WriteSpanWithContext(ctx context.Context, span *model.Span) error to propagate context.

Alternatively, we may update to WriteSpan(ctx context.Context, *model.Span) error.

Unfortunately, both of these are breaking changes. Alternatively, we may create a WriterV2 interface, and supply a converter from Writer to WriterV2. Such a converter would simply use ctx.Background() for the context parameter.

@ghost ghost added the needs-triage label Jan 6, 2020
@yurishkuro
Copy link
Member

I would vote for simply changing the signature to WriteSpan(ctx context.Context, *model.Span) error. We did the same for the Reader interface in #1038.

@jpkrohling
Copy link
Contributor

Implemented via #2436

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

No branches or pull requests

3 participants