Expose Transaction.Context.Request and Transaction.Context.Response#134
Merged
gregkalapos merged 16 commits intoelastic:masterfrom Mar 4, 2019
gregkalapos:ExposeContextV2
Merged
Expose Transaction.Context.Request and Transaction.Context.Response#134gregkalapos merged 16 commits intoelastic:masterfrom gregkalapos:ExposeContextV2
gregkalapos merged 16 commits intoelastic:masterfrom
gregkalapos:ExposeContextV2
Conversation
Codecov Report
@@ Coverage Diff @@
## master #134 +/- ##
==========================================
+ Coverage 82.69% 83.05% +0.36%
==========================================
Files 36 37 +1
Lines 1144 1151 +7
Branches 183 184 +1
==========================================
+ Hits 946 956 +10
Misses 125 125
+ Partials 73 70 -3
Continue to review full report at Codecov.
|
Contributor
Author
|
Reverted Reason: This value-behaviour and forcing users to set everything at once would be strange in C#. 😢 |
Merged
| Assert.True(payloadSender.FirstTransaction.Context.Response.Finished); | ||
| Assert.Equal(200, payloadSender.FirstTransaction.Context.Response.StatusCode); | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
Maybe it's worth adding a test that sets a property of Request/Response object after construction.
Contributor
Author
There was a problem hiding this comment.
👍 Added a test doing that.
* move assertions over to fluent assertions * Add extensions for should duration assertions * move new Asserts over after rebase
This reverts commit 5ba803e.
This reverts commit 842eda0.
Also remove some unused variables
…agent-dotnet into ExposeContextV2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Potential solution to #124 - 2. Version, follow-up from #130
Types that we make public moved from
Elastic.Apm.Model.PayloadtoElastic.Apm.Api.This makes both
Context.RequestandContext.Responsepublic.I also madeUpdate: reverted, we useRequest,Response,Url, andSocketto astruct.class.With this dangerous code like this won't compile:And code like this will work and won't throw, even if Request is not initialized:This'll also work and not throw:I'll follow up on this, maybe we'll need to adjust our serialization to this, but I think it's worth it.