Skip to content

Support v3 extension header#4666

Merged
wu-sheng merged 10 commits intoapache:masterfrom
mrproliu:v3-extension
Apr 21, 2020
Merged

Support v3 extension header#4666
wu-sheng merged 10 commits intoapache:masterfrom
mrproliu:v3-extension

Conversation

@mrproliu
Copy link
Copy Markdown
Contributor

Please answer these questions before submitting pull request


New feature or improvement

  • Provide the new v3 extension protocol java implementation.

@mrproliu mrproliu added the agent Language agent related. label Apr 18, 2020
@mrproliu mrproliu added this to the 8.0.0 milestone Apr 18, 2020
@codecov-io
Copy link
Copy Markdown

codecov-io commented Apr 18, 2020

Codecov Report

Merging #4666 into master will decrease coverage by 51.30%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #4666       +/-   ##
============================================
- Coverage     51.30%   0.00%   -51.31%     
============================================
  Files          1272     152     -1120     
  Lines         27623    3731    -23892     
  Branches       2997     444     -2553     
============================================
- Hits          14171       0    -14171     
+ Misses        12810    3731     -9079     
+ Partials        642       0      -642     
Impacted Files Coverage Δ Complexity Δ
...walking/apm/agent/core/context/ContextCarrier.java 0.00% <0.00%> (-73.92%) 0.00 <0.00> (-9.00)
...alking/apm/agent/core/context/ContextSnapshot.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...lking/apm/agent/core/context/ExtensionContext.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...pm/agent/core/context/SW8ExtensionCarrierItem.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...walking/apm/agent/core/context/TracingContext.java 0.00% <0.00%> (-70.17%) 0.00 <0.00> (-24.00)
.../agent/core/context/trace/AbstractTracingSpan.java 0.00% <0.00%> (-66.35%) 0.00 <0.00> (-13.00)
...pache/skywalking/apm/agent/core/base64/Base64.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
...king/apm/util/RunnableWithExceptionProtection.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
...ywalking/apm/agent/core/logging/core/LogLevel.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-1.00%)
...ywalking/apm/agent/core/plugin/EnhanceContext.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-5.00%)
... and 1252 more

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 418bdff...ad53121. Read the comment docs.

@mrproliu mrproliu changed the title [WIP]Support v3 extension header Support v3 extension header Apr 19, 2020
@mrproliu
Copy link
Copy Markdown
Contributor Author

@dmsolr @wu-sheng @kezhenxu94 I think this PR is ready to review, thanks.

@mrproliu
Copy link
Copy Markdown
Contributor Author

@kezhenxu94 hello, I see the Report Coverage stage has been failed, can I re-run it?

@kezhenxu94
Copy link
Copy Markdown
Member

@kezhenxu94 hello, I see the Report Coverage stage has been failed, can I re-run it?

Yes, feel free to rerun it next time

entryService: http://localhost:8080/apm-toolkit-trace-scenario/case/tool-kit
healthCheck: http://localhost:8080/apm-toolkit-trace-scenario/case/healthCheck
startScript: ./bin/startup.sh
extendEntryHeader:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this config for injecting headers?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, follow this config I can read the extension header.

@wu-sheng
Copy link
Copy Markdown
Member

And one more important thing, I think you should add skip analysis support at the OAP side. You could do that in a separated PR or this one. If you will do in another PR, please confirm here.

@mrproliu
Copy link
Copy Markdown
Contributor Author

And one more important thing, I think you should add skip analysis support at the OAP side. You could do that in a separated PR or this one. If you will do in another PR, please confirm here.

I seem you have already implemented the skip analysis logic at the OAP side and I have test with the UI, It worked.

Copy link
Copy Markdown
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

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

LGTM. @arugal after this, you could add the manipulation logic into go2sky, then in MOSN,

Such as in this scenario

HTTP call -> sidecar(1) -> service A -> sidecar(2) ------network-------> sidecar(3) -> serviceB

we should

  1. At (1), set entry span as normal, active skipAnalysis in the header and tag exit span as skipAnalysis=true
  2. At (2), override skipAnalysis to false / or not propagate header of sw8-x, so entry span is skipAnalysis=true, exit span is normal and sw8 header injected as usual
  3. At (3), same as step 1, just process the header, which we should already have. List here just for the explanation. Nothing special on the code level.

The above mode is side car agent mode. We need it when MOSN or Envoy(Rust agent) is deployed in the service mesh scenario. Because in there, proxy would always call delegated service by 127.0.0.1, drawing that on the topology is confusing, but we need this back, when service -> sidecar(active here) -> another sidecar

Basically, we need a mode config in the MOSN tracer config. Values are normal(default), proxy or sidecar. Normal it is fully functional, like it is already done today.

FYI @rootsongjc

@wu-sheng wu-sheng linked an issue Apr 21, 2020 that may be closed by this pull request
@wu-sheng wu-sheng merged commit 7d1fdd3 into apache:master Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Language agent related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Extension Header Item in java agent

4 participants