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

Updated to new Azure ServiceBus Go SDK #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andersosthus
Copy link

Changes:

Only thing is the new TotalMessages field on Topic Subscriptions. We could potentially put that in the existing ScheduledMessages field there, not sure about that one.

@marcinbudny
Copy link
Owner

Hi Anders, thank you for the contribution. Unfortunately I won't be able to take a look at this for next ~1,5 weeks. I'll try to come back to this ASAP.

@andersosthus
Copy link
Author

No worries, I realized after I'd done the upgrade that I needed some custom logic in the exporter, so I wrote a new one for my specific use case. But I'll still follow up on this one if there are anything you would like me to change/fix for the PR.

@@ -5,8 +5,9 @@ import (
"net/http"
"time"

"github.com/namsral/flag"
"github.com/sirupsen/logrus"
"flag"
Copy link
Owner

Choose a reason for hiding this comment

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

This change removed support for passing configuration via environment variables

"github.com/sirupsen/logrus"
"flag"

klog "k8s.io/klog/v2"
Copy link
Owner

Choose a reason for hiding this comment

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

What is the reason to switch to klog?

type config struct {
timeout time.Duration
port uint
verbose bool
Copy link
Owner

Choose a reason for hiding this comment

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

can you explain removal of the verbose flag?

}

log.WithFields(logrus.Fields{
Copy link
Owner

Choose a reason for hiding this comment

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

can you explain removal of this diagnostic log?

@@ -23,6 +25,7 @@ type MessageCounts struct {
ScheduledMessages int32
TransferDeadLetterMessages int32
TransferMessages int32
TotalMessageCount int64
Copy link
Owner

Choose a reason for hiding this comment

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

This value is not collected in collectMessageCounts in collector.go

@@ -50,6 +50,8 @@ func newMessageCountMetrics(itemName string, labels ...string) messageCountMetri
fmt.Sprintf("%s transfer messages count", itemName), labels, nil),
transferDeadLetterMessages: prometheus.NewDesc(fmt.Sprintf("servicebus_%s_transfer_dead_letter_messages", strings.ToLower(itemName)),
fmt.Sprintf("%s transfer dead letter messages count", itemName), labels, nil),
totalMessageCount: prometheus.NewDesc(fmt.Sprintf("servicebus_%s_transfer_total_messages", strings.ToLower(itemName)),
Copy link
Owner

Choose a reason for hiding this comment

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

this one should be servicebus_%s_total_messages I think?

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.

None yet

2 participants