Skip to content

Updated to new Azure ServiceBus Go SDK - #6

Open
andersosthus wants to merge 1 commit into
marcinbudny:masterfrom
andersosthus:update-to-azure-service-bus-go
Open

Updated to new Azure ServiceBus Go SDK#6
andersosthus wants to merge 1 commit into
marcinbudny:masterfrom
andersosthus:update-to-azure-service-bus-go

Conversation

@andersosthus

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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.

Comment thread servicebus_exporter.go

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

Copy link
Copy Markdown
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

Comment thread servicebus_exporter.go
"github.com/sirupsen/logrus"
"flag"

klog "k8s.io/klog/v2"

Copy link
Copy Markdown
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?

Comment thread servicebus_exporter.go
type config struct {
timeout time.Duration
port uint
verbose bool

Copy link
Copy Markdown
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?

Comment thread servicebus_exporter.go
klog.Fatal("Azure ServiceBus connection string not provided")
}

log.WithFields(logrus.Fields{

Copy link
Copy Markdown
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?

ScheduledMessages int32
TransferDeadLetterMessages int32
TransferMessages int32
TotalMessageCount int64

Copy link
Copy Markdown
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

Comment thread collector/collector.go
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
Copy Markdown
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.

2 participants