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

Add metrics for "$upstream_connect_time" #258

Merged
merged 3 commits into from
Apr 24, 2022

Conversation

martin-helmich
Copy link
Owner

Fixes #252

}

// Init initializes a metrics struct
func (m *Collection) Init(cfg *config.NamespaceConfig) {
Copy link

Choose a reason for hiding this comment

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

Method Collection.Init has 83 lines of code (exceeds 50 allowed). Consider refactoring.

@@ -356,7 +227,7 @@ func processNamespace(nsCfg config.NamespaceConfig, metrics *Metrics) {

}

func processSource(nsCfg config.NamespaceConfig, t tail.Follower, parser parser.Parser, metrics *Metrics, hasCounterOnlyLabels bool) {
func processSource(nsCfg config.NamespaceConfig, t tail.Follower, parser parser.Parser, metrics *metrics.Collection, hasCounterOnlyLabels bool) {
Copy link

Choose a reason for hiding this comment

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

Function processSource has 52 lines of code (exceeds 50 allowed). Consider refactoring.

"github.com/martin-helmich/prometheus-nginxlog-exporter/prof"
"github.com/martin-helmich/prometheus-nginxlog-exporter/relabeling"
"github.com/martin-helmich/prometheus-nginxlog-exporter/tail"
"github.com/martin-helmich/prometheus-nginxlog-exporter/pkg/config"
Copy link

Choose a reason for hiding this comment

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

2: cannot find package "github.com/martin-helmich/prometheus-nginxlog-exporter/pkg/config" in any of:

@codeclimate
Copy link

codeclimate bot commented Apr 24, 2022

Code Climate has analyzed commit 2c401ba and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2
Bug Risk 1

View more on Code Climate.

@martin-helmich martin-helmich merged commit 171d51e into master Apr 24, 2022
@martin-helmich martin-helmich deleted the task/add-upstream-connect-time branch April 24, 2022 13:15
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.

Add new metrics for '$upstream_connect_time'
1 participant