Spaces:
Paused
Paused
File size: 471 Bytes
9792ea7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # -*- coding: utf-8 -*-
"""The tracing interface class in agentscope."""
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from opentelemetry.trace import Tracer
else:
Tracer = "Tracer"
def _get_tracer() -> Tracer:
"""Get the tracer
Returns:
`Tracer`: The tracer with the name "agentscope" and version.
"""
from opentelemetry import trace
from ..._version import __version__
return trace.get_tracer("agentscope", __version__)
|