Enhance Traceback depth (#206)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d685eef..ab07e11 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,7 +28,7 @@
- Add support for Python 3.10 (#167)
- Add E2E test coverage for trace and logging (#199)
- Add a `SW_AGENT_LOG_REPORTER_SAFE_MODE` option to control the HTTP basic auth credential filter (#TBD)
-
+ - Now Log reporter `cause_exception_depth` traceback limit defaults to 10
### 0.7.0
- Feature:
diff --git a/docs/en/setup/EnvVars.md b/docs/en/setup/EnvVars.md
index 17c56d8..e3cd6c6 100644
--- a/docs/en/setup/EnvVars.md
+++ b/docs/en/setup/EnvVars.md
@@ -47,6 +47,6 @@
| `SW_AGENT_LOG_REPORTER_IGNORE_FILTER` | This config customizes whether to ignore the application-defined logger filters, if `True`, all logs are reported disregarding any filter rules. | `False` |
| `SW_AGENT_LOG_REPORTER_FORMATTED` | If `True`, the log reporter will transmit the logs as formatted. Otherwise, puts logRecord.msg and logRecord.args into message content and tags(`argument.n`), respectively. Along with an `exception` tag if an exception was raised. | `True` |
| `SW_AGENT_LOG_REPORTER_LAYOUT` | The log reporter formats the logRecord message based on the layout given. | `%(asctime)s [%(threadName)s] %(levelname)s %(name)s - %(message)s` |
-| `SW_AGENT_CAUSE_EXCEPTION_DEPTH` | This config limits agent to report up to `limit` stacktrace, please refer to [Python traceback](https://docs.python.org/3/library/traceback.html#traceback.print_tb) for more explanations. | `5` |
+| `SW_AGENT_CAUSE_EXCEPTION_DEPTH` | This config limits agent to report up to `limit` stacktrace, please refer to [Python traceback](https://docs.python.org/3/library/traceback.html#traceback.print_tb) for more explanations. | `10` |
| `SW_PYTHON_BOOTSTRAP_PROPAGATE` | This config controls the child process agent bootstrap behavior in `sw-python` CLI, if set to `False`, a valid child process will not boot up a SkyWalking Agent. Please refer to the [CLI Guide](CLI.md) for details. | unset |
| `SW_FASTAPI_COLLECT_HTTP_PARAMS` | This config item controls that whether the FastAPI plugin should collect the parameters of the request. | `false` |
diff --git a/docs/en/setup/advanced/LogReporter.md b/docs/en/setup/advanced/LogReporter.md
index d08972b..50edb87 100644
--- a/docs/en/setup/advanced/LogReporter.md
+++ b/docs/en/setup/advanced/LogReporter.md
@@ -61,7 +61,7 @@
`thread` - the thread name
### Limit stacktrace depth
-You can set the `cause_exception_depth` config entry to a desired level(defaults to 5), which limits the output depth of exception stacktrace in reporting.
+You can set the `cause_exception_depth` config entry to a desired level(defaults to 10), which limits the output depth of exception stacktrace in reporting.
This config limits agent to report up to `limit` stacktrace, please refer to [Python traceback](https://docs.python.org/3/library/traceback.html#traceback.print_tb) for more explanations.
diff --git a/skywalking/config.py b/skywalking/config.py
index 2d84449..7866655 100644
--- a/skywalking/config.py
+++ b/skywalking/config.py
@@ -83,7 +83,7 @@
log_reporter_layout: str = os.getenv('SW_AGENT_LOG_REPORTER_LAYOUT') or \
'%(asctime)s [%(threadName)s] %(levelname)s %(name)s - %(message)s'
# This configuration is shared by log reporter and tracer
-cause_exception_depth: int = int(os.getenv('SW_AGENT_CAUSE_EXCEPTION_DEPTH') or '5')
+cause_exception_depth: int = int(os.getenv('SW_AGENT_CAUSE_EXCEPTION_DEPTH') or '10')
options = {key for key in globals() if key not in options} # THIS MUST FOLLOW DIRECTLY AFTER LIST OF CONFIG OPTIONS!