fix for locals max length
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6bc3f2974..e1add184d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ### Fixed
 
+- Fixed issue with `locals_max_length` parameter not being respected in Traceback https://github.com/Textualize/rich/issues/2649
 - Handling of broken `fileno` made more robust. Fixes https://github.com/Textualize/rich/issues/2645
 - Fixed missing `fileno` on FileProxy
 
diff --git a/rich/pretty.py b/rich/pretty.py
index b26791db7..7de32da25 100644
--- a/rich/pretty.py
+++ b/rich/pretty.py
@@ -371,6 +371,7 @@ def __rich_measure__(
             indent_size=self.indent_size,
             max_length=self.max_length,
             max_string=self.max_string,
+            max_depth=self.max_depth,
             expand_all=self.expand_all,
         )
         text_width = (
diff --git a/rich/traceback.py b/rich/traceback.py
index 712cbaf5c..8e18df837 100644
--- a/rich/traceback.py
+++ b/rich/traceback.py
@@ -290,7 +290,12 @@ def from_exception(
             Traceback: A Traceback instance that may be printed.
         """
         rich_traceback = cls.extract(
-            exc_type, exc_value, traceback, show_locals=show_locals
+            exc_type,
+            exc_value,
+            traceback,
+            show_locals=show_locals,
+            locals_max_length=locals_max_length,
+            locals_max_string=locals_max_string,
         )
         return cls(
             rich_traceback,

Fixes https://github.com/Textualize/rich/issues/2649