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

elasticapm: add Context.SetFramework #252

Merged
merged 3 commits into from
Oct 3, 2018

Conversation

axw
Copy link
Member

@axw axw commented Oct 3, 2018

Add a method for instrumentation to set the framework information for a transaction or error context.

At the time of writing, the server merges back-to-front such that service-level overrides event-level, but that's OK for our purposes as we only set framework info in the transaction/error level, and never in service-level metadata.

Update apmecho, apmgin, and apmgrpc server middleware to set the framework info.

Closes #69

@codecov-io
Copy link

codecov-io commented Oct 3, 2018

Codecov Report

Merging #252 into v2 will increase coverage by 0.03%.
The diff coverage is 66.19%.

Impacted file tree graph

@@            Coverage Diff             @@
##               v2     #252      +/-   ##
==========================================
+ Coverage   80.73%   80.76%   +0.03%     
==========================================
  Files          92       92              
  Lines        5420     5481      +61     
==========================================
+ Hits         4376     4427      +51     
+ Misses        836      834       -2     
- Partials      208      220      +12
Impacted Files Coverage Δ
module/apmecho/middleware.go 85.24% <100%> (+0.24%) ⬆️
utils.go 96.61% <100%> (ø) ⬆️
module/apmgrpc/server.go 87.71% <100%> (+0.44%) ⬆️
module/apmgin/middleware.go 85.71% <100%> (+0.2%) ⬆️
context.go 92.07% <100%> (+0.96%) ⬆️
model/marshal_fastjson.go 85.06% <56.36%> (-0.84%) ⬇️
tracer.go 83.92% <0%> (ø) ⬆️
internal/fastjson/writer.go 71.42% <0%> (+2.59%) ⬆️

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 c14a780...804f997. Read the comment docs.

axw added 3 commits October 3, 2018 11:28
Enable transactions and errors to override
the service in their context. At the time
of writing, the server merges back-to-front
such that service-level overrides event-level,
but even that's OK for our purposes as we
will only set framework info in the transaction
context, and never in service-level metadata.
Add a method for instrumentation to set the
framework information for a transaction or
error context.
Update apmecho, apmgin, and apmgrpc server
middleware to set the framework info.
@axw axw force-pushed the v2-transaction-service-override branch from c88ce31 to 804f997 Compare October 3, 2018 03:28
@axw axw merged commit 324f0c3 into elastic:v2 Oct 3, 2018
@axw axw deleted the v2-transaction-service-override branch October 3, 2018 03:48
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