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

Add component type label for prometheus metrics. #2364

Merged
merged 4 commits into from
Sep 30, 2017

Conversation

cckellogg
Copy link
Contributor

No description provided.

@@ -43,6 +43,12 @@

private static final String DELIMITER = "\n";

// bolt metric
private static final String METRIC_EXECUTE_TIME_NS = "__execute-time-ns/default";
Copy link
Contributor

Choose a reason for hiding this comment

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

Just __execute-time-ns should do the trick. Since the stream name could be different

Copy link
Contributor Author

@cckellogg cckellogg Sep 29, 2017

Choose a reason for hiding this comment

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

I tried without the default on some of the examples and seems to not work. It seems like the default is needed.

msa/exclaim1/container_1_exclaim1_3:
{__execute-time-ns/word/default=4.36168882E8, __fail-count/word/default=0.0, __execute-latency/default=10412.989280683745, __process-latency/default=9611.879413660563, __fail-count/default=0.0, __process-latency/word/default=9611.879413660563, __execute-count/word/default=41887.0, __execute-latency/word/default=10412.989280683745, __ack-count/word/default=41887.0, __tuple-serialization-time-ns/default=9.5455816E7, __ack-count/default=41887.0, __execute-count/default=41887.0, auto/selected_items=4.0, __out-queue-full-count=103.0, __emit-count/default=41887.0, __execute-time-ns/default=4.36168882E8}

In what cases would I not see default at the end?

The other option is i can go through all the metric names and if check to see if "__execute-time-ns" is in the name.

@srkukarni
Copy link
Contributor

if users use collector.emit(new Values(..)), then you would see default.
In cases when they use collector.emit(streamName, new Values(...)) like the underlying spouts/bolts in dsl, you would see the actual stream name.

@cckellogg cckellogg merged commit 72d5bfb into apache:master Sep 30, 2017
nicknezis pushed a commit that referenced this pull request Sep 14, 2020
* Add component type label for prometheus metrics.

* Remove unused variable.

* Do not assume default for __execute-time-ns metric.

* Fix code style error.
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