@@ -660,6 +660,7 @@ def fetch_traces(
660
660
session_id : Optional [str ] = None ,
661
661
from_timestamp : Optional [dt .datetime ] = None ,
662
662
to_timestamp : Optional [dt .datetime ] = None ,
663
+ environment : Optional [Union [str , Sequence [str ]]] = None ,
663
664
order_by : Optional [str ] = None ,
664
665
tags : Optional [Union [str , Sequence [str ]]] = None ,
665
666
) -> FetchTracesResponse :
@@ -673,6 +674,7 @@ def fetch_traces(
673
674
session_id (Optional[str]): Filter by session_id. Defaults to None.
674
675
from_timestamp (Optional[dt.datetime]): Retrieve only traces with a timestamp on or after this datetime. Defaults to None.
675
676
to_timestamp (Optional[dt.datetime]): Retrieve only traces with a timestamp before this datetime. Defaults to None.
677
+ environment (Optional[Union[str, Sequence[str]]]): Filter by environment. Defaults to None.
676
678
order_by (Optional[str]): Format of the string `[field].[asc/desc]`. Fields: id, timestamp, name, userId, release, version, public, bookmarked, sessionId. Example: `timestamp.asc`. Defaults to None.
677
679
tags (Optional[Union[str, Sequence[str]]]): Filter by tags. Defaults to None.
678
680
@@ -684,7 +686,7 @@ def fetch_traces(
684
686
"""
685
687
try :
686
688
self .log .debug (
687
- f"Getting traces... { page } , { limit } , { name } , { user_id } , { session_id } , { from_timestamp } , { to_timestamp } , { order_by } , { tags } "
689
+ f"Getting traces... { page } , { limit } , { name } , { user_id } , { session_id } , { from_timestamp } , { to_timestamp } , { environment } , { order_by } , { tags } "
688
690
)
689
691
res = self .client .trace .list (
690
692
page = page ,
@@ -694,6 +696,7 @@ def fetch_traces(
694
696
session_id = session_id ,
695
697
from_timestamp = from_timestamp ,
696
698
to_timestamp = to_timestamp ,
699
+ environment = environment ,
697
700
order_by = order_by ,
698
701
tags = tags ,
699
702
)
@@ -768,6 +771,7 @@ def fetch_observations(
768
771
parent_observation_id : typing .Optional [str ] = None ,
769
772
from_start_time : typing .Optional [dt .datetime ] = None ,
770
773
to_start_time : typing .Optional [dt .datetime ] = None ,
774
+ environment : Optional [Union [str , Sequence [str ]]] = None ,
771
775
type : typing .Optional [str ] = None ,
772
776
) -> FetchObservationsResponse :
773
777
"""Get a list of observations in the current project matching the given parameters.
@@ -781,6 +785,7 @@ def fetch_observations(
781
785
parent_observation_id (Optional[str]): Parent observation identifier. Defaults to None.
782
786
from_start_time (Optional[dt.datetime]): Retrieve only observations with a start_time on or after this datetime. Defaults to None.
783
787
to_start_time (Optional[dt.datetime]): Retrieve only observations with a start_time before this datetime. Defaults to None.
788
+ environment (Optional[Union[str, Sequence[str]]]): Filter by environment. Defaults to None.
784
789
type (Optional[str]): Type of the observation. Defaults to None.
785
790
786
791
Returns:
@@ -791,7 +796,7 @@ def fetch_observations(
791
796
"""
792
797
try :
793
798
self .log .debug (
794
- f"Getting observations... { page } , { limit } , { name } , { user_id } , { trace_id } , { parent_observation_id } , { from_start_time } , { to_start_time } , { type } "
799
+ f"Getting observations... { page } , { limit } , { name } , { user_id } , { trace_id } , { parent_observation_id } , { from_start_time } , { to_start_time } , { environment } , { type } "
795
800
)
796
801
res = self .client .observations .get_many (
797
802
page = page ,
@@ -802,6 +807,7 @@ def fetch_observations(
802
807
parent_observation_id = parent_observation_id ,
803
808
from_start_time = from_start_time ,
804
809
to_start_time = to_start_time ,
810
+ environment = environment ,
805
811
type = type ,
806
812
)
807
813
return FetchObservationsResponse (data = res .data , meta = res .meta )
0 commit comments