-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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: Structured metadata stream stats #15427
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # pkg/querier/ingester_querier.go
💻 Deploy preview available: https://deploy-preview-loki-15427-zb444pucvq-vp.a.run.app/docs/loki/latest/ |
IMO we should have a dedicated API endpoint, such as |
@chaudum we already have a @salvacorts I haven't looked at all the changes here, but I love the idea of putting structured metadata keys in the index! I think we should refactor |
Thank you @trevorwhitney and @chaudum We have been discussing this issue in Slack but I wanted to share my answer here as well. re. using I think the workflow in Grafana should look sth like:
re. implementing a new On a separate note, I'm going on PTO for some weeks. I think @shantanualsi may be able to take over this PR if we want to continue working on this one during holidays season. |
@salvacorts yes, which is why I think we should refactor it to get structured metadata keys from the index (but still use the log selector query to get structured metadata values).I agree getting fields + structured metadata would still be slow, so maybe we add a query parameter for just getting the structured metadata? My concern with adding this to If we do keep this in I do like your auto-complete use case though, for having this either in |
What this PR does / why we need it:
This PR adds structured metadata (SM) stats to the TSDB index. For each stream we save a list of available structured metadata field names. We then use these stats to:
On ingesters, for each stream we keep (here):
On the flush loop, the Ingester updates the TSDB with the closed set of stats.
We store these stats next to the label set of each stream on TSDB. As for regular labels, SM names are referenced using the symbols table.
Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)feat
PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.md
deprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR