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

graphite-compatible msgpack support #789

Merged
merged 2 commits into from
Dec 20, 2017
Merged

Conversation

DanCech
Copy link
Contributor

@DanCech DanCech commented Dec 18, 2017

This adds support for format=msgpack to /render and /metrics/find

@Dieterbe
Copy link
Contributor

do you want a review?

//msgp:ignore SeriesCompleterItem
//msgp:ignore SeriesTree
//msgp:ignore SeriesTreeItem

Copy link
Contributor

Choose a reason for hiding this comment

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

you can just add the generate line to the types you want, then you don't neede all these ignores

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

you're right. in fact having the generate lines for types as we do now in some other places is misleading because it actually works on the file level.

"github.com/tinylib/msgp/msgp"
)

type Msgpack struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

so it seems the whole and only reason we have this new type, and don't just keep using the old Msgp type for this new use case, is the slightly different header? otherwise they seem interchangeable. correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that is the only difference.

@@ -1,7 +1,7 @@
{
"name":"graphite",
"type":"graphite",
"url":"http://graphite",
"url":"http://graphite:80",
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this?

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 updated docker-dev to match docker-standard

Copy link
Contributor

Choose a reason for hiding this comment

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

docker-dev has always worked fine for me without the explicit port, i recommend you take out this change out of the commit. it seems like setting the example to others in a confusing way (so we should probably simplify docker-standard, if anything)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we specify the port for metrictank, I think it's clearer and more consistent to have it here also just so there's no confusion.

Makefile Outdated
@@ -13,6 +13,10 @@ bin-race:
./scripts/build_tools.sh -race
docker:
./scripts/build_docker.sh
dev:
./scripts/build.sh
./scripts/build_docker.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

it is very rare that you have to rebuild the docker image when using the docker-dev stack. the whole point of the docker-dev stack is that it'll mount your custom binary and configs without having to build an image.

also you're better off using the launch.sh script (since it sets up a bunch of stuff up by default) instead of calling docker-compose directly.

I recommend taking this commit out of this PR, i would accept it as a new pr with the changes described

@DanCech DanCech merged commit 79829a9 into grafana:master Dec 20, 2017
@DanCech DanCech deleted the msgpack branch December 20, 2017 16:15
@Dieterbe Dieterbe mentioned this pull request Jan 4, 2018
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.

2 participants