mirror of
https://github.com/langgenius/dify.git
synced 2026-03-28 17:40:53 +08:00
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com> Co-authored-by: Yunlu Wen <yunlu.wen@dify.ai> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
22 lines
462 B
Python
22 lines
462 B
Python
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass
|
|
from typing import TYPE_CHECKING, Any
|
|
|
|
if TYPE_CHECKING:
|
|
from core.ops.entities.trace_entity import TraceTaskName
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class TelemetryContext:
|
|
tenant_id: str | None = None
|
|
user_id: str | None = None
|
|
app_id: str | None = None
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class TelemetryEvent:
|
|
name: TraceTaskName
|
|
context: TelemetryContext
|
|
payload: dict[str, Any]
|