We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbd54ff commit 28cad57Copy full SHA for 28cad57
util/opentelemetry-util-genai/src/opentelemetry/util/genai/utils.py
@@ -12,10 +12,10 @@
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
14
15
-import json
16
import logging
17
import os
18
from base64 import b64encode
+from json import encoder
19
from typing import Any
20
21
from opentelemetry.instrumentation._semconv import (
@@ -59,7 +59,7 @@ def get_content_capturing_mode() -> ContentCapturingMode:
59
return ContentCapturingMode.NO_CONTENT
60
61
62
-class Base64JsonEncoder(json.JSONEncoder):
+class Base64JsonEncoder(encoder.JSONEncoder):
63
def default(self, o: Any) -> Any:
64
if isinstance(o, bytes):
65
return b64encode(o).decode()
0 commit comments