Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[jaeger-v2] Define an internal interface of storage v2 spanstore #5399
[jaeger-v2] Define an internal interface of storage v2 spanstore #5399
Changes from 6 commits
b10a1ee
5ad4862
1905b67
5b59349
36c235a
61eba67
663324d
40467b0
ee73249
929288e
27451ec
c851fb2
67bd83b
04459ae
bc09999
08fb5d7
c6b2e27
6cbd5d8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend comparing this with OTEL collector component lifecycle methods. Eg would you need to accept telemetry objects here, or would it be passed to the constructor function? Do we need Close if we're adding lifecycle methods?
Also, different storage factories (eg dependencies storage) would need the same lifestyle interface so it should be pulled to the higher pkg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will pass the telemetry objects to the constructor and only receive the logger and config, which is similar to the existing factory, e.g.
grpc.NewFactory(*zap.Logger, grpc.Config)
. I've looked into other OTEL collector extension implementations and they (mostly) only accept logger from the telemetry object.I've added the flowchart of OTEL collector component's lifecycle below. Inside the
Component.Start(context.Context, component.Host)
, we will callspanstore.NewFactory(*zap.Logger, component.Config)
and thenFactory.Initialize(context.Context)
. Once the component is shutting down throughComponent.Shutdown(context.Context)
, we will callFactory.Close(context.Context)
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the return value should be in ptrace model, similar to Writer
Isn't there a TraceID type in
ptrace
? I would use that - we want to do a clean break from legacy/model/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they have TraceID type defined in the pcommon pkg.
I see, I'll keep that in mind!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, this one is tricky. We want the result to be
ptrace
model, but inptrace
there is not clear separation of spans from different traces, instead the separation is by resource/scope, which are not very relevant on retrieval (usually by then they are de-normalized onto individual spans in storage, although some storage backends can theoretically store fully normalized model). Plus, in order to reproduce the grouping of spans into resource/scope hierarchy we need to do relatively expensive comparison (fwiw the query service does this today for Process deduping, even though the UI does not make use of such normalization).I believe in my RFC I proposed returning
[]*ptrace.TraceData
from these. The deduping could be an optional step/enrichment in the query-service, rather than forcing each storage backend do that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.