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

services/horizon/ingest: added more description to the history archive metrics labels #5185

Merged
merged 4 commits into from
Feb 1, 2024

Conversation

sreuland
Copy link
Contributor

PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with name of package that is most changed in the PR, ex.
    services/friendbot, or all or doc if the changes are broad or impact many
    packages.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.
  • I've updated any docs (developer docs, .md
    files, etc... affected by this change). Take a look in the docs folder for a given service,
    like this one.

Release planning

  • I've updated the relevant CHANGELOG (here for Horizon) if
    needed with deprecations, added features, breaking changes, and DB schema changes.
  • I've decided if this PR requires a new major/minor version according to
    semver, or if it's mainly a patch change. The PR is targeted at the next
    release branch if it's not a patch change.

What

added more content to the history archive request metrics

Why

there are sub-labels for the history archive metrics key, and the additional docs help describe what each label is counting.

Known limitations

@sreuland sreuland requested a review from jacekn January 30, 2024 21:47
Copy link
Contributor

@jacekn jacekn left a comment

Choose a reason for hiding this comment

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

Text looks good but I'm not sure how newline will behave in prometheus.
I only saw single line HELP text. It would be good to test this and confirm how output looks like

Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

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

awesome!!

@sreuland
Copy link
Contributor Author

sreuland commented Feb 1, 2024

Text looks good but I'm not sure how newline will behave in prometheus. I only saw single line HELP text. It would be good to test this and confirm how output looks like

yes, the prometheus go lib, coerces all help strings into %q which forces all non-text char's to be printed with escapes, so, I just separated with in-line commas, here's what the final output will look like in metrics output:

# HELP horizon_ingest_history_archive_stats_total Counters of different history archive requests.  'source' label will provide name/address of the physical history archive server from the pool for which a request may be sent.  'type' label will further categorize the potential request into specific requests, 'file_downloads' - the count of files downloaded from an archive server, 'file_uploads' - the count of files uploaded to an archive server, 'requests' - the count of all http requests(includes both queries and file downloads) sent to an archive server, 'cache_hits' - the count of requests for an archive file that were found on local cache instead, no download request sent to archive server.
# TYPE horizon_ingest_history_archive_stats_total counter


@sreuland sreuland requested a review from jacekn February 1, 2024 01:13
Copy link
Contributor

@jacekn jacekn left a comment

Choose a reason for hiding this comment

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

Looks great from my perspective but please get 2nd +1 from somebody with more golang experience

@sreuland sreuland merged commit 2df2810 into stellar:master Feb 1, 2024
29 checks passed
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.

3 participants