crowdcomms / apistar-aws-xray Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hey,
I know this probably won't get a lot of traction as apistar is pretty much abandoned now, but i've noticed an incompatibility with aws-xray-sdk and your code.
error message:
TypeError: calculate_sampling_decision() got an unexpected keyword argument 'service_name'
call in apistar-aws-xray.AWSXrayEventHook
sampling_decision = calculate_sampling_decision(
trace_header=xray_header,
recorder=self._recorder,
service_name=host,
method=method,
path=path
)
in aws_xray_sdk.ext.util
def calculate_sampling_decision(trace_header, recorder, sampling_req):
"""
Return 1 or the matched rule name if should sample and 0 if should not.
The sampling decision coming from ``trace_header`` always has
the highest precedence. If the ``trace_header`` doesn't contain
sampling decision then it checks if sampling is enabled or not
in the recorder. If not enbaled it returns 1. Otherwise it uses user
defined sampling rules to decide.
"""
if trace_header.sampled is not None and trace_header.sampled != '?':
return trace_header.sampled
elif not recorder.sampling:
return 1
else:
decision = recorder.sampler.should_trace(sampling_req)
return decision if decision else 0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.