Skip to content
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

Use labels for namerd prometheus stats #1394

Open
klingerf opened this issue Jun 15, 2017 · 2 comments
Open

Use labels for namerd prometheus stats #1394

klingerf opened this issue Jun 15, 2017 · 2 comments

Comments

@klingerf
Copy link
Member

We don't do any stat rewriting for namerd stats that are exported to prometheus (we do rewrite stats for linkerd, see #1061). As a result, we end up with stats that look like this:

namer:__io_l5d_k8s:client:connects 2
interface:io_l5d_mesh:connects 16
interface:io_l5d_httpController:io_l5d_httpController:connects 25
interface:io_l5d_thriftNameInterpreter:thrift:connects 13
interface:io_l5d_thriftNameInterpreter:thrift:thriftmux:connects 9

It would be preferable to rewrite them to something like:

namer:client:connects{client="__io_l5d_k8s"}
interface:connects{interface="io_l5d_mesh"}
interface:connects{interface="io_l5d_httpController"}
interface:connects{interface="io_l5d_thriftNameInterpreter", protocol="thrift"}
interface:connects{interface="io_l5d_thriftNameInterpreter", protocol="thriftmux"}

Or similar.

Tim-Brooks pushed a commit to Tim-Brooks/linkerd that referenced this issue Dec 20, 2018
The `reader.Read` method only reads as many bytes as are currently available from reader.  When reading the 4 byte message length header, if not all 4 of those bytes are available, `Read` will only read the available bytes and return.  This causes alignment issues when the message body is read and there are still unread header bytes in the reader.  These bytes will appear at the beginning of the message body and cause a crash when the message is unmarshalled.

Use `io.ReadFull` to ensure that we read all 4 of the message length header bytes.

Fixes linkerd#1287 

Signed-off-by: Alex Leong <[email protected]>
@nemobis
Copy link

nemobis commented Jan 19, 2021

Big +1! With a vanilla JMX exporter, before relabelling, nodes expose thousands of metrics with very long names, sometimes over 200 bytes and 9 levels.

@cpretzer
Copy link
Contributor

Hi @nemobis Linkerd 1 is in maintenance mode as we focus on Linkerd 2. That being said, if you're up for contributing, we'd love a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants