Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Get explodes when underlying metric is composite #83

@Bachmann1234

Description

@Bachmann1234

Howdy!

So when I make call to get

b = self.conn.get('SuperSecret-metric-name')

I get the following exception

'The server sent me something that is not a Gauge nor a Counter.'

What is going on is the metric being returned is a composite metric.

In fact with this commit I get something that works

Bachmann1234@e35bcd4

Now, normally I would just make a PR about this and call it a day. But, I do not wanna do that here. Because this would make the get method return an object in some cases and a dict in other cases. Which seems bad.

I saw that basic composite support was added in #79

You chose not to make an object. Was this just the easiest thing at the time? In short... would it be a problem if I made a composite object and had get return that?

If I do that could I change get_composite to return the object instead of the raw response dict?

Also, where can I read more about these? My initial poking around did not find too much detail.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions