Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

implement /metrics/expand endpoint #1795

Merged
merged 3 commits into from
Aug 12, 2020
Merged

implement /metrics/expand endpoint #1795

merged 3 commits into from
Aug 12, 2020

Conversation

replay
Copy link
Contributor

@replay replay commented Apr 22, 2020

Implements the API endpoint /metrics/expand as documented here.

Without it we can't claim to be API compatible with Graphite

api/graphite.go Outdated Show resolved Hide resolved
@@ -64,6 +64,7 @@ func (s *Server) RegisterRoutes() {
// Graphite endpoints
r.Combo("/render", cBody, withOrg, ready, bind(models.GraphiteRender{})).Get(s.renderMetrics).Post(s.renderMetrics)
r.Combo("/metrics/find", withOrg, ready, bind(models.GraphiteFind{})).Get(s.metricsFind).Post(s.metricsFind)
r.Combo("/metrics/expand", withOrg, ready, bind(models.GraphiteExpand{})).Get(s.metricsExpand).Post(s.metricsExpand)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update docs/http-api.md and docs/cloud/http-api.md

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added docs in docs/http-api.md.
I'm not sure that it makes sense to also document it in docs/cloud/http-api.md because I think that by adding it there we kind of like recommend to our users to use that endpoint, but in reality it's really mostly redundant to /metrics/find and we only need to support it to be able to claim "graphite compatibility". I think if a user isn't already looking for this specific endpoint because they know it from graphite, there's no need to mention it, it's just cluttering the docs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should document it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i added docs for it

@replay replay force-pushed the metrics_expand branch 3 times, most recently from 10406bf to 950beb0 Compare May 13, 2020 11:58
@stale
Copy link

stale bot commented Aug 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 11, 2020
@stale stale bot removed the stale label Aug 11, 2020
@Dieterbe
Copy link
Contributor

@replay please rebase and merge

@replay
Copy link
Contributor Author

replay commented Aug 12, 2020

sure, i'll have to drop my last commit again then, because in the meantime /docs/cloud has been removed from this repo. I can make another PR with my last change to the website repo

@replay
Copy link
Contributor Author

replay commented Aug 12, 2020

I've copy-pasted the changes to the cloud docs into this PR: https://github.com/grafana/website/pull/2081

@replay replay merged commit 6c3706a into master Aug 12, 2020
@replay replay deleted the metrics_expand branch August 12, 2020 13:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants