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

implement client trace metrics #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

instabledesign
Copy link
Member

@instabledesign instabledesign commented Sep 9, 2019

WIP enhance conf/metrics builder
TODO write tests

@@ -44,3 +46,91 @@ func Metrics(config *metrics.Config) httpware.Tripperware {
})
}
}

func MetricsTrace(it *metrics.InstrumentTrace) httpware.Tripperware {
Copy link

Choose a reason for hiding this comment

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

Function MetricsTrace has 83 lines of code (exceeds 50 allowed). Consider refactoring.

@@ -44,3 +46,91 @@ func Metrics(config *metrics.Config) httpware.Tripperware {
})
}
}

func MetricsTrace(it *metrics.InstrumentTrace) httpware.Tripperware {
Copy link

Choose a reason for hiding this comment

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

Function MetricsTrace has a Cognitive Complexity of 64 (exceeds 20 allowed). Consider refactoring.

"github.com/gol4ng/httpware/metrics"
)

func NewInstrumentTrace(config ConfigTrace) *metrics.InstrumentTrace {
Copy link

Choose a reason for hiding this comment

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

Function NewInstrumentTrace has 72 lines of code (exceeds 50 allowed). Consider refactoring.

TLSLatencyBuckets []float64
}

func (c *ConfigTrace) defaults() {

Choose a reason for hiding this comment

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

U1000: func (*ConfigTrace).defaults is unused (from unused)

@codeclimate
Copy link

codeclimate bot commented Sep 11, 2019

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

Here's the issue category breakdown:

Category Count
Complexity 3

The test coverage on the diff in this pull request is 0.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 70.7% (-29.3% change).

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants