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

WOR-1480 use open telemetry to emit metrics #2719

Merged
merged 6 commits into from
Jan 31, 2024
Merged

WOR-1480 use open telemetry to emit metrics #2719

merged 6 commits into from
Jan 31, 2024

Conversation

dvoet
Copy link
Contributor

@dvoet dvoet commented Jan 30, 2024

Ticket: https://broadworkbench.atlassian.net/browse/WOR-1480

  1. replace use of OpenTelemetryMetrics (which does not actually use open telemetry) with the real thing
  2. use open telemetry to produce prometheus page
  3. better way of figuring out standard http route (by grabbing it from swagger)

PR checklist

  • Include the JIRA issue number in the PR description and title
  • Make sure Swagger is updated if API changes
    • ...and Orchestration's Swagger too!
  • If you changed anything in model/, then you should publish a new official rawls-model and update rawls-model in Orchestration's dependencies.
  • Get two thumbsworth of PR review
  • Verify all tests go green, including CI tests
  • Squash commits and merge to develop (branches are automatically deleted after merging)
  • Inform other teams of any substantial changes via Slack and/or email

(Slash ~ "api").? / "workspaces" / (!"entities" ~ Segment) / (Segment ~ SegmentIgnore.repeat(0,
Int.MaxValue,
separator = Slash
(Slash ~ "api").? / "workspaces" / (!("entities" | "id") ~ Segment) / (Segment ~ SegmentIgnore.repeat(0,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this and the following change made me look for better and more future proof ways to figure out a standard name for an api "route". We have this all in swagger, why not parse that?

@dvoet
Copy link
Contributor Author

dvoet commented Jan 31, 2024

jenkins retest

override def receive: Receive = { case DeleteExpiredGrants =>
for {
_ <- openTelemetry.incrementCounter("fastpass-monitor-sweeper-start", tags = openTelemetryTags).unsafeToFuture()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note that I removed this metric because it has no value - this function is called on a schedule every 10s

@dvoet dvoet merged commit c244da2 into develop Jan 31, 2024
13 checks passed
@dvoet dvoet deleted the otel_metrics_2 branch January 31, 2024 20:04
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