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
[v2][storage] Move span reader decorator to storage factories #6280
[v2][storage] Move span reader decorator to storage factories #6280
Changes from 8 commits
a2ee10e
a156666
3584e8c
b25b893
d7d2bc9
b63af21
294c5d0
f8192a0
6f678c5
6ac1aea
6744399
0fd8360
f7547da
214aac0
e6e8704
83aa823
46ab305
343c90d
b9b5972
a5a673f
6d9e80b
d0319f1
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.
Why not keep these two here? Otherwise you're duplicating namespace assignments twice, which means they can get out of sync.
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.
@yurishkuro Done. However,
CreateSamplingStore
(https://github.com/jaegertracing/jaeger/blob/main/plugin/storage/cassandra/factory.go#L211) andCreateDependencyReader
(https://github.com/jaegertracing/jaeger/blob/main/plugin/storage/cassandra/factory.go#L175) will now have therole=primary
attached to the metrics they emit. Is this fine? or should they just be emitting metrics under the namespace passed into the storage factory without the role tag?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 think sampling store should be
kind=cassandra, role=sampling
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.
@yurishkuro Done. What about the dependency reader? I'm using the base factory for now.
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.
what would it look like? Dependencies technically were always bundled within the spanstore, not a different "role".
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 metrics would be published under
jaeger_storage_***
withkind=cassandra
but norole
tag.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.
that's fine
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.
although since it's using the primary connection / session I would pass it the primary metrics
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.
done
Check warning on line 166 in plugin/storage/cassandra/factory.go
Codecov / codecov/patch
plugin/storage/cassandra/factory.go#L165-L166
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.
wrap CreateArchiveSpanReader to? This is where you can apply a label
name=primary|archive
before creating decoratorThere 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.
@yurishkuro would we need to namespace the metric factory again? The factory doesn't expose a way to just label an existing namespace.
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.
why not - you can pass just the tags, with empty name
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.
oh okay got it - but the
name
label is already provided for v2 and we don't want to override it. Should we give the label a different name? What abouttype
?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.
maybe
role
thenThere 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.
type
andkind
are kind of the same.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.
@yurishkuro Sounds good. One other thing to note about cassandra is that it currently holds two metrics factories that publish metrics under
jaeger_cassandra_***
andjaeger_cassandra-archive_***
(https://github.com/jaegertracing/jaeger/blob/main/plugin/storage/cassandra/factory.go#L136-L137). Do we want to change these namespaces to match the same ones we're using for the decorator? So we could publish underjaeger_storage_***
with therole
,kind
, andname
(only for v2) labels instead ofjaeger_cassandra_***
andjaeger_cassandra-archive_***
.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, I was thinking that too, since we're making a breaking change anyway let's make them more consistent.
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.
@yurishkuro Made this change and updated the PR with a summary of the breaking changes
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.
for name, factory
is actuallyfor kind, factory
, because in v1 there is notion of storage names. The closest v1 has to names is primary/archive, which you might add to the namespace as a name attribute in CreateReader vs. CreateArchiveReaderThere 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.
@yurishkuro We're not recording any metrics today for the archive span reader so can we just leave the name tag off?