Skip to content

Commit a5e1e86

Browse files
committed
Respond to comment
1 parent 6f1a5a7 commit a5e1e86

File tree

1 file changed

+4
-0
lines changed
  • opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export

1 file changed

+4
-0
lines changed

opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ def on_emit(self, log_data: LogData):
135135
)
136136
for item in traceback.extract_stack()
137137
)
138+
# Recursive depth of 3 is sort of arbitrary. It's possible that an Exporter.export call
139+
# emits a log which returns us to this function, but when we call Exporter.export again the log
140+
# is no longer emitted and we exit this recursive loop naturally, a depth of 3 allows some
141+
# Exporter.export recursive log calls but exits after a few.
138142
> 3
139143
):
140144
_propagate_false_logger.warning(

0 commit comments

Comments
 (0)