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 apmchi module to support github.com/go-chi/chi #495

Merged
merged 4 commits into from
Apr 4, 2019

Conversation

rliebz
Copy link
Contributor

@rliebz rliebz commented Apr 2, 2019

Create an apmchi module in modules/, which allows users to create middleware to log to Elastic APM. Does the standard apmhttp stuff, but also handles parametrized paths.

It can be used as follows:

r := chi.NewRouter()
r.Use(apmchi.Middleware())

Resolves #494

@rliebz rliebz force-pushed the apmchi branch 5 times, most recently from 2867205 to 58dea39 Compare April 2, 2019 21:58
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

Thank you @rliebz, this is looking great!

module/apmchi/middleware.go Outdated Show resolved Hide resolved
module/apmchi/middleware.go Show resolved Hide resolved
@axw
Copy link
Member

axw commented Apr 3, 2019

jenkins run the tests please

@codecov-io
Copy link

codecov-io commented Apr 3, 2019

Codecov Report

Merging #495 into master will increase coverage by 0.17%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #495      +/-   ##
==========================================
+ Coverage   83.64%   83.81%   +0.17%     
==========================================
  Files         113      113              
  Lines        6566     6550      -16     
==========================================
- Hits         5492     5490       -2     
+ Misses        772      760      -12     
+ Partials      302      300       -2
Impacted Files Coverage Δ
module/apmchi/middleware.go 94.11% <94.11%> (+20.11%) ⬆️
module/apmhttp/ignorer.go 50% <0%> (+16.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update add430b...0ef149a. Read the comment docs.

@rliebz
Copy link
Contributor Author

rliebz commented Apr 3, 2019

Not sure what makes Jenkins fail whenever I push, but otherwise I think it's good to go.

Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

Thank you for the top quality PR!
LGTM, will merge after Jenkins is happy.

@axw
Copy link
Member

axw commented Apr 4, 2019

Not sure what makes Jenkins fail whenever I push, but otherwise I think it's good to go.

Our Jenkins CI only runs when instructed to by @elastic folks, preventing damage by malicious PRs. I'll get it going.

@axw
Copy link
Member

axw commented Apr 4, 2019

jenkins run the tests please

@axw axw merged commit 289ed4c into elastic:master Apr 4, 2019
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

3 participants