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

Adds prometheus metrics endpoint #24

Merged
merged 4 commits into from
Jun 13, 2023

Conversation

StrongestNumber9
Copy link
Contributor

No description provided.

@StrongestNumber9 StrongestNumber9 requested a review from kortemik May 22, 2023 18:13
This was linked to issues May 22, 2023
@StrongestNumber9
Copy link
Contributor Author

Will include the DropWizard stats on the same PR as further commit as they are linked together

@StrongestNumber9 StrongestNumber9 mentioned this pull request May 23, 2023
38 tasks
@StrongestNumber9
Copy link
Contributor Author

Implemented some of the metrics, and they require plenty of review especially with the errors/reconnects/connections part

public class RelpOutput {
private static final Logger LOGGER = LoggerFactory.getLogger(RelpOutput.class);
private final RelpConnection relpConnection;
private final AppConfigRelp relpConfig;
private final int id;

Counter totalReconnects;
Copy link
Member

Choose a reason for hiding this comment

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

private final these


private void loadMetrics() {
// All registered through PrometheusMetrics
MetricRegistry metricRegistry = SharedMetricRegistries.getOrCreate("default");
Copy link
Member

Choose a reason for hiding this comment

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

pass rather as an object in constructor than singleton getter

@@ -1,6 +1,6 @@
FROM rockylinux:8
COPY rpm/target/rpm/com.teragrep-k8s_01/RPMS/noarch/com.teragrep-k8s_01-*.rpm /rpm/
RUN dnf -y install jq java-1.8.0-headless /rpm/*.rpm && yum clean all
RUN dnf -y install jq /rpm/*.rpm && yum clean all
Copy link

Choose a reason for hiding this comment

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

DL3040: dnf clean all missing after dnf command.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

@@ -1,6 +1,6 @@
FROM rockylinux:8
COPY rpm/target/rpm/com.teragrep-k8s_01/RPMS/noarch/com.teragrep-k8s_01-*.rpm /rpm/
RUN dnf -y install jq java-1.8.0-headless /rpm/*.rpm && yum clean all
RUN dnf -y install jq /rpm/*.rpm && yum clean all
Copy link

Choose a reason for hiding this comment

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

DL3041: Specify version with dnf install -y <package>-<version>.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

@StrongestNumber9
Copy link
Contributor Author

Requested fixes done, self approving for now

@StrongestNumber9 StrongestNumber9 merged commit 3a4d23e into teragrep:main Jun 13, 2023
@StrongestNumber9 StrongestNumber9 deleted the prometheus branch June 13, 2023 10:58
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

Successfully merging this pull request may close these issues.

add dropwizard metrics implement prometheus metrics endpoint
2 participants