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

Allow concurrent polling #170

Merged
merged 4 commits into from
Nov 30, 2023
Merged

Allow concurrent polling #170

merged 4 commits into from
Nov 30, 2023

Conversation

samuelattwood
Copy link
Member

  • Adds flightGroup to Collect to allow concurrent polling with unified response

Copy link
Contributor

@caleblloyd caleblloyd left a comment

Choose a reason for hiding this comment

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

Suggestion on Var Name then LGTM

for _, streamStat := range stat.jetstreamStreams {
ch <- newGaugeMetric(sc.descs.accJetstreamConsumerCount, streamStat.consumerCount, append(id, streamStat.streamName))
ch <- newGaugeMetric(sc.descs.accJetstreamReplicaCount, streamStat.replicaCount, append(id, streamStat.streamName))
bufferChan := make(chan prometheus.Metric)
Copy link
Contributor

Choose a reason for hiding this comment

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

bufferChan seems like a bad name here because this is an un-buffered channel... maybe call it collectCh?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's fair - I only named it that way since it's basically a buffer before writing out to the real channel.

@samuelattwood samuelattwood merged commit 4299d7d into main Nov 30, 2023
2 checks passed
@samuelattwood samuelattwood deleted the sattwood/concurrent-poll branch November 30, 2023 06:32
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.

2 participants