-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NH-64716 First steps to integrate oboe settings API #223
Changes from 11 commits
5dd45e9
92447e7
8955bb0
c04e03e
8afeb58
f716c1c
5a230eb
59fd12f
a6922f3
1cd708c
15ac925
1034e69
d371bce
9aac496
9ed2fd7
a005273
6fb725f
d92638c
c6d9f8b
0cbfc53
5069826
a477a07
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,10 +71,7 @@ def __init__(self, apm_config: "SolarWindsApmConfig"): | |
else: | ||
self.tracing_mode = self._UNSET | ||
|
||
if self.apm_config.is_lambda: | ||
# TODO Init OboeAPI if apm_config.is_lambda | ||
# https://swicloud.atlassian.net/browse/NH-64716 | ||
pass | ||
self.oboe_settings_api = apm_config.oboe_api() | ||
|
||
def get_description(self) -> str: | ||
return "SolarWinds custom opentelemetry sampler" | ||
|
@@ -175,11 +172,7 @@ def calculate_liboboe_decision( | |
timestamp = xtraceoptions.timestamp | ||
|
||
if self.apm_config.is_lambda: | ||
# TODO OboeAPI getTracingDecision | ||
# https://swicloud.atlassian.net/browse/NH-64716 | ||
logger.warning( | ||
"Sampling in lambda is not yet implemented. Dropping trace." | ||
) | ||
logger.debug("Sampling in lambda mode.") | ||
( | ||
do_metrics, | ||
do_sample, | ||
|
@@ -192,19 +185,7 @@ def calculate_liboboe_decision( | |
status_msg, | ||
auth_msg, | ||
status, | ||
) = ( | ||
0, | ||
0, | ||
0, | ||
0, | ||
0.0, | ||
0.0, | ||
0, | ||
0, | ||
"", | ||
"", | ||
0, | ||
) | ||
) = self.oboe_settings_api.getTracingDecision() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do the arguments to this call not matter ? Actually curious if passing it the same thing as the non-lambda version vs passing it nothing makes any difference or if I should be doing it differently on my side of things There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah good question. Tried it now and yes, this method does not explode if passed all the same non-lambda args (though it's a drop decision). Works if no args at all of course. It does error out if I try other combinations of args: |
||
|
||
else: | ||
logger.debug( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what happens if APM Python is built using c-lib < 14.0.0