Backward compatibility with svc target and dest resource#7925
Backward compatibility with svc target and dest resource#7925
Conversation
|
This pull request does not have a backport label. Could you fix it @lahsivjar? 🙏
NOTE: |
💔 Tests Failed
Expand to view the summary
Build stats
Test stats 🧪
Test errors
Expand to view the tests failures
|
b8366d1 to
c7ec339
Compare
|
/test |
🌐 Coverage report
|
c7ec339 to
35a7111
Compare
|
/test |
35a7111 to
05c369f
Compare
05c369f to
2546636
Compare
stuartnelson3
left a comment
There was a problem hiding this comment.
looks good! could you add a unit test to verify this is being called and doing the right thing within the mapping code path?
SylvainJuge
left a comment
There was a problem hiding this comment.
LGTM on my side, definitely seems to fit the spec. +100 on adding automated tests for that as this kind of mapping tend to break easily over time. As I'm not go-fluent and very familiar with apm-server codebase, don´t block merging this PR on my approval.
I would be able to validate this with an agent once #7924 is merged.
|
In the Case 3, when not sending the new fields, for the last case, on top of checking that This should also apply to the general case where the resource can't be parsed to any known format, in this case the field |
marclop
left a comment
There was a problem hiding this comment.
I'm also in favor to adding some tests here to ensure it behaves as expected.
marclop
left a comment
There was a problem hiding this comment.
LGTM. Thanks for all the changes
|
Mind adding a changelog entry as well? It seems that's the only thing missing. |
@marclop Added changelog entry |
|
/test |
|
Failing tests are flaky, merging based on this comment |
|
tested with d920cdd case 1: Is this correct? The test case says the data should be available under case 2: same question; assuming this is correct then 👌 case 3: same question; assuming this is correct then 👌 |
|
@stuartnelson3 You are correct, it should be |
|
cool, then 👍 confirmed |
Motivation/summary
span.context.destination.service.resourcespan.context.service.target.{type, name}fromspan.context.destination.service.resourceif the former not providedFull spec list available at elastic/apm#627
Checklist
apmpackagehave been made)How to test these changes
Case 1
span.context.service.target.{type, name}via the intake APIservice.target.nameandservice.target.typevaluesCase 2
span.context.destination.service.resourcevia the intake API along withspan.context.service.target.{type, name}service.target.nameandservice.target.typevalues as passed via the intake APICase 3
span.context.destination.service.resourcevia the intake API WITHOUTspan.context.service.target.{type, name}in 3 formats via 3 separate requests, example:postgres/testdbpostgreslocalhost:8080service.target.nameandservice.target.typevalues based on the spec. Example based on point 1:target.type = postgresandtarget.name = testdbtarget.type = postgrestarget.type = ""andtarget.name = localhost:8080Related issues
Closes #7734