@@ -31,7 +31,7 @@ def daily(
3131 tags : typing .Optional [typing .Union [str , typing .Sequence [str ]]] = None ,
3232 from_timestamp : typing .Optional [dt .datetime ] = None ,
3333 to_timestamp : typing .Optional [dt .datetime ] = None ,
34- request_options : typing .Optional [RequestOptions ] = None
34+ request_options : typing .Optional [RequestOptions ] = None ,
3535 ) -> DailyMetrics :
3636 """
3737 Get daily metrics of the Langfuse project
@@ -54,10 +54,10 @@ def daily(
5454 Optional filter for metrics where traces include all of these tags
5555
5656 from_timestamp : typing.Optional[dt.datetime]
57- Optional filter to only include traces on or after a certain datetime (ISO 8601)
57+ Optional filter to only include traces and observations on or after a certain datetime (ISO 8601)
5858
5959 to_timestamp : typing.Optional[dt.datetime]
60- Optional filter to only include traces before a certain datetime (ISO 8601)
60+ Optional filter to only include traces and observations before a certain datetime (ISO 8601)
6161
6262 request_options : typing.Optional[RequestOptions]
6363 Request-specific configuration.
@@ -103,8 +103,12 @@ def daily(
103103 "traceName" : trace_name ,
104104 "userId" : user_id ,
105105 "tags" : tags ,
106- "fromTimestamp" : serialize_datetime (from_timestamp ) if from_timestamp is not None else None ,
107- "toTimestamp" : serialize_datetime (to_timestamp ) if to_timestamp is not None else None ,
106+ "fromTimestamp" : serialize_datetime (from_timestamp )
107+ if from_timestamp is not None
108+ else None ,
109+ "toTimestamp" : serialize_datetime (to_timestamp )
110+ if to_timestamp is not None
111+ else None ,
108112 },
109113 request_options = request_options ,
110114 )
@@ -114,13 +118,21 @@ def daily(
114118 if _response .status_code == 400 :
115119 raise Error (pydantic_v1 .parse_obj_as (typing .Any , _response .json ())) # type: ignore
116120 if _response .status_code == 401 :
117- raise UnauthorizedError (pydantic_v1 .parse_obj_as (typing .Any , _response .json ())) # type: ignore
121+ raise UnauthorizedError (
122+ pydantic_v1 .parse_obj_as (typing .Any , _response .json ())
123+ ) # type: ignore
118124 if _response .status_code == 403 :
119- raise AccessDeniedError (pydantic_v1 .parse_obj_as (typing .Any , _response .json ())) # type: ignore
125+ raise AccessDeniedError (
126+ pydantic_v1 .parse_obj_as (typing .Any , _response .json ())
127+ ) # type: ignore
120128 if _response .status_code == 405 :
121- raise MethodNotAllowedError (pydantic_v1 .parse_obj_as (typing .Any , _response .json ())) # type: ignore
129+ raise MethodNotAllowedError (
130+ pydantic_v1 .parse_obj_as (typing .Any , _response .json ())
131+ ) # type: ignore
122132 if _response .status_code == 404 :
123- raise NotFoundError (pydantic_v1 .parse_obj_as (typing .Any , _response .json ())) # type: ignore
133+ raise NotFoundError (
134+ pydantic_v1 .parse_obj_as (typing .Any , _response .json ())
135+ ) # type: ignore
124136 _response_json = _response .json ()
125137 except JSONDecodeError :
126138 raise ApiError (status_code = _response .status_code , body = _response .text )
@@ -141,7 +153,7 @@ async def daily(
141153 tags : typing .Optional [typing .Union [str , typing .Sequence [str ]]] = None ,
142154 from_timestamp : typing .Optional [dt .datetime ] = None ,
143155 to_timestamp : typing .Optional [dt .datetime ] = None ,
144- request_options : typing .Optional [RequestOptions ] = None
156+ request_options : typing .Optional [RequestOptions ] = None ,
145157 ) -> DailyMetrics :
146158 """
147159 Get daily metrics of the Langfuse project
@@ -164,10 +176,10 @@ async def daily(
164176 Optional filter for metrics where traces include all of these tags
165177
166178 from_timestamp : typing.Optional[dt.datetime]
167- Optional filter to only include traces on or after a certain datetime (ISO 8601)
179+ Optional filter to only include traces and observations on or after a certain datetime (ISO 8601)
168180
169181 to_timestamp : typing.Optional[dt.datetime]
170- Optional filter to only include traces before a certain datetime (ISO 8601)
182+ Optional filter to only include traces and observations before a certain datetime (ISO 8601)
171183
172184 request_options : typing.Optional[RequestOptions]
173185 Request-specific configuration.
@@ -220,8 +232,12 @@ async def main() -> None:
220232 "traceName" : trace_name ,
221233 "userId" : user_id ,
222234 "tags" : tags ,
223- "fromTimestamp" : serialize_datetime (from_timestamp ) if from_timestamp is not None else None ,
224- "toTimestamp" : serialize_datetime (to_timestamp ) if to_timestamp is not None else None ,
235+ "fromTimestamp" : serialize_datetime (from_timestamp )
236+ if from_timestamp is not None
237+ else None ,
238+ "toTimestamp" : serialize_datetime (to_timestamp )
239+ if to_timestamp is not None
240+ else None ,
225241 },
226242 request_options = request_options ,
227243 )
@@ -231,13 +247,21 @@ async def main() -> None:
231247 if _response .status_code == 400 :
232248 raise Error (pydantic_v1 .parse_obj_as (typing .Any , _response .json ())) # type: ignore
233249 if _response .status_code == 401 :
234- raise UnauthorizedError (pydantic_v1 .parse_obj_as (typing .Any , _response .json ())) # type: ignore
250+ raise UnauthorizedError (
251+ pydantic_v1 .parse_obj_as (typing .Any , _response .json ())
252+ ) # type: ignore
235253 if _response .status_code == 403 :
236- raise AccessDeniedError (pydantic_v1 .parse_obj_as (typing .Any , _response .json ())) # type: ignore
254+ raise AccessDeniedError (
255+ pydantic_v1 .parse_obj_as (typing .Any , _response .json ())
256+ ) # type: ignore
237257 if _response .status_code == 405 :
238- raise MethodNotAllowedError (pydantic_v1 .parse_obj_as (typing .Any , _response .json ())) # type: ignore
258+ raise MethodNotAllowedError (
259+ pydantic_v1 .parse_obj_as (typing .Any , _response .json ())
260+ ) # type: ignore
239261 if _response .status_code == 404 :
240- raise NotFoundError (pydantic_v1 .parse_obj_as (typing .Any , _response .json ())) # type: ignore
262+ raise NotFoundError (
263+ pydantic_v1 .parse_obj_as (typing .Any , _response .json ())
264+ ) # type: ignore
241265 _response_json = _response .json ()
242266 except JSONDecodeError :
243267 raise ApiError (status_code = _response .status_code , body = _response .text )
0 commit comments