mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
opentelemetry: no_log:true causes exception when generating trace (#4043)
* dont check for urls when args is None * add changelog fragment * fix lint on changelog fragment Co-authored-by: Nick Gregory <nick.gregory@openenterprise.co.uk>
This commit is contained in:
parent
20d09a4ae6
commit
5540dab382
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/4043-fix-no-log-opentelemetry.yml
Normal file
2
changelogs/fragments/4043-fix-no-log-opentelemetry.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- "opentelemetry - fix generating a trace with a task containing ``no_log: true`` (https://github.com/ansible-collections/community.general/pull/4043)."
|
|
@ -321,7 +321,7 @@ class OpenTelemetrySource(object):
|
||||||
# the order matters
|
# the order matters
|
||||||
url_args = ("url", "api_url", "baseurl", "repo", "server_url", "chart_repo_url")
|
url_args = ("url", "api_url", "baseurl", "repo", "server_url", "chart_repo_url")
|
||||||
for arg in url_args:
|
for arg in url_args:
|
||||||
if args.get(arg):
|
if args is not None and args.get(arg):
|
||||||
return args.get(arg)
|
return args.get(arg)
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue