Skip to content

Commit

Permalink
fix(opentelemetry): adjust default value for store_spans_in_file ca…
Browse files Browse the repository at this point in the history
…using traces to be produced to a file named `None` (ansible-collections#8741)

* fix(opentelemetry): adjust default value for `store_spans_in_file` causing traces to be produced to a file named `None`

The commit 5f48193 introduced `store_spans_in_file` with the default
value `None` as a string. This causes the value of `store_spans_in_file`
to be a not empty string, value=None as a string and not a null value.
The rest of the code check if the store_spans_in_file is not null which
squeezes the rest of the code. The following commit set the default
value as an empty string.

Signed-off-by: Wilfried Roset <[email protected]>

* fix(opentelemetry): No default value is better, reword changelog

Signed-off-by: Wilfried Roset <[email protected]>

---------

Signed-off-by: Wilfried Roset <[email protected]>
  • Loading branch information
wilfriedroset authored and aioue committed Oct 1, 2024
1 parent 75897b9 commit caa23fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/8741-fix-opentelemetry-callback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- opentelemetry callback plugin - fix default value for ``store_spans_in_file`` causing traces to be produced to a file named ``None`` (https://github.com/ansible-collections/community.general/issues/8566, https://github.com/ansible-collections/community.general/pull/8741).
1 change: 0 additions & 1 deletion plugins/callback/opentelemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
key: disable_attributes_in_logs
version_added: 7.1.0
store_spans_in_file:
default: None
type: str
description:
- It stores the exported spans in the given file
Expand Down

0 comments on commit caa23fb

Please sign in to comment.