alonelaval commented on a change in pull request #55:
URL: https://github.com/apache/skywalking-python/pull/55#discussion_r463919895
##########
File path: skywalking/trace/context/__init__.py
##########
@@ -118,23 +119,44 @@ def active_span(self):
return None
+ def get_correlation(self, key):
+ if key in self._correlation:
+ return self._correlation[key]
+ return None
+
+ def put_correlation(self, key, value):
+ if key is None or value is None:
Review comment:
ok
##########
File path: tests/plugin/sw_flask/services/provider.py
##########
@@ -24,12 +24,16 @@
config.logging_level = 'DEBUG'
agent.start()
- from flask import Flask, jsonify
+ from flask import Flask, jsonify, request
app = Flask(__name__)
@app.route("/users", methods=["POST", "GET"])
def application():
+ print(request.headers)
+ from skywalking.trace.context import get_context
+ print(get_context().get_correlation("test"))
+ print(get_context().get_correlation("test2"))
Review comment:
ok
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]