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

module/apmhttp: set client request URL #172

Merged
merged 3 commits into from
Aug 8, 2018

Conversation

axw
Copy link
Member

@axw axw commented Aug 8, 2018

In the elasticapm package, we introduce a new SpanContext.SetHTTPRequest method which records the URL of an outgoing HTTP request in span context, and later add it to the span model object. Finally we modify the apmhttp client instrumentation to make use of this.

Closes #171

axw added 3 commits August 8, 2018 15:30
Add the SpanContext.HTTP field, of type HTTPSpanContext.
This new type contains a single "url" field, for storing
the URL of client-side HTTP requests. We strip out the
user:password from the URL, if included.
Add the SetHTTPRequest method to SpanContext,
which records the HTTP request URL in the
span context.
Modify the client instrumentation to record
the URL in the span context.
@axw axw force-pushed the apmhttp-client-http-url branch from 5e8eaac to fc1d1de Compare August 8, 2018 07:44
@codecov-io
Copy link

codecov-io commented Aug 8, 2018

Codecov Report

Merging #172 into master will increase coverage by 0.06%.
The diff coverage is 70.49%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
+ Coverage   74.48%   74.55%   +0.06%     
==========================================
  Files          83       83              
  Lines        5036     5093      +57     
==========================================
+ Hits         3751     3797      +46     
- Misses       1102     1108       +6     
- Partials      183      188       +5
Impacted Files Coverage Δ
context.go 89.58% <ø> (ø) ⬆️
module/apmhttp/client.go 73.91% <100%> (+5.02%) ⬆️
spancontext.go 100% <100%> (ø) ⬆️
model/marshal.go 79.31% <65.85%> (-1.52%) ⬇️
model/marshal_fastjson.go 87.77% <73.33%> (-0.35%) ⬇️
tracer.go 87.03% <0%> (+1.15%) ⬆️

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 9408954...fc1d1de. Read the comment docs.

@axw axw merged commit 5bb918e into elastic:master Aug 8, 2018
@axw axw deleted the apmhttp-client-http-url branch August 8, 2018 08:08
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