feat: remove telemetry traceable

This commit is contained in:
Emilio Garcia 2025-11-26 10:38:00 -05:00
parent b1c5b8fa9f
commit 60da397018
10 changed files with 0 additions and 41 deletions

View file

@ -1,22 +0,0 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
def telemetry_traceable(cls):
"""
Mark a protocol for automatic tracing when telemetry is enabled.
This is a metadata-only decorator with no dependencies on core.
Actual tracing is applied by core routers at runtime if telemetry is enabled.
Usage:
@runtime_checkable
@telemetry_traceable
class MyProtocol(Protocol):
...
"""
cls.__marked_for_tracing__ = True
return cls

View file

@ -9,7 +9,6 @@ from typing import Annotated, Literal, Protocol, runtime_checkable
from pydantic import BaseModel, Field
from llama_stack_api.common.tracing import telemetry_traceable
from llama_stack_api.openai_responses import (
OpenAIResponseInputFunctionToolCallOutput,
OpenAIResponseMCPApprovalRequest,
@ -157,7 +156,6 @@ class ConversationItemDeletedResource(BaseModel):
@runtime_checkable
@telemetry_traceable
class Conversations(Protocol):
"""Conversations

View file

@ -11,7 +11,6 @@ from fastapi import File, Form, Response, UploadFile
from pydantic import BaseModel, Field
from llama_stack_api.common.responses import Order
from llama_stack_api.common.tracing import telemetry_traceable
from llama_stack_api.schema_utils import json_schema_type, webmethod
from llama_stack_api.version import LLAMA_STACK_API_V1
@ -102,7 +101,6 @@ class OpenAIFileDeleteResponse(BaseModel):
@runtime_checkable
@telemetry_traceable
class Files(Protocol):
"""Files

View file

@ -22,7 +22,6 @@ from llama_stack_api.common.content_types import InterleavedContent
from llama_stack_api.common.responses import (
Order,
)
from llama_stack_api.common.tracing import telemetry_traceable
from llama_stack_api.models import Model
from llama_stack_api.schema_utils import json_schema_type, register_schema, webmethod
from llama_stack_api.version import LLAMA_STACK_API_V1, LLAMA_STACK_API_V1ALPHA
@ -989,7 +988,6 @@ class OpenAIEmbeddingsRequestWithExtraBody(BaseModel, extra="allow"):
@runtime_checkable
@telemetry_traceable
class InferenceProvider(Protocol):
"""
This protocol defines the interface that should be implemented by all inference providers.

View file

@ -9,7 +9,6 @@ from typing import Any, Literal, Protocol, runtime_checkable
from pydantic import BaseModel, ConfigDict, Field, field_validator
from llama_stack_api.common.tracing import telemetry_traceable
from llama_stack_api.resource import Resource, ResourceType
from llama_stack_api.schema_utils import json_schema_type, webmethod
from llama_stack_api.version import LLAMA_STACK_API_V1
@ -106,7 +105,6 @@ class OpenAIListModelsResponse(BaseModel):
@runtime_checkable
@telemetry_traceable
class Models(Protocol):
async def list_models(self) -> ListModelsResponse:
"""List all models.

View file

@ -10,7 +10,6 @@ from typing import Protocol, runtime_checkable
from pydantic import BaseModel, Field, field_validator, model_validator
from llama_stack_api.common.tracing import telemetry_traceable
from llama_stack_api.schema_utils import json_schema_type, webmethod
from llama_stack_api.version import LLAMA_STACK_API_V1
@ -93,7 +92,6 @@ class ListPromptsResponse(BaseModel):
@runtime_checkable
@telemetry_traceable
class Prompts(Protocol):
"""Prompts

View file

@ -9,7 +9,6 @@ from typing import Any, Protocol, runtime_checkable
from pydantic import BaseModel, Field
from llama_stack_api.common.tracing import telemetry_traceable
from llama_stack_api.inference import OpenAIMessageParam
from llama_stack_api.schema_utils import json_schema_type, webmethod
from llama_stack_api.shields import Shield
@ -94,7 +93,6 @@ class ShieldStore(Protocol):
@runtime_checkable
@telemetry_traceable
class Safety(Protocol):
"""Safety

View file

@ -8,7 +8,6 @@ from typing import Any, Literal, Protocol, runtime_checkable
from pydantic import BaseModel
from llama_stack_api.common.tracing import telemetry_traceable
from llama_stack_api.resource import Resource, ResourceType
from llama_stack_api.schema_utils import json_schema_type, webmethod
from llama_stack_api.version import LLAMA_STACK_API_V1
@ -49,7 +48,6 @@ class ListShieldsResponse(BaseModel):
@runtime_checkable
@telemetry_traceable
class Shields(Protocol):
@webmethod(route="/shields", method="GET", level=LLAMA_STACK_API_V1)
async def list_shields(self) -> ListShieldsResponse:

View file

@ -11,7 +11,6 @@ from pydantic import BaseModel
from typing_extensions import runtime_checkable
from llama_stack_api.common.content_types import URL, InterleavedContent
from llama_stack_api.common.tracing import telemetry_traceable
from llama_stack_api.resource import Resource, ResourceType
from llama_stack_api.schema_utils import json_schema_type, webmethod
from llama_stack_api.version import LLAMA_STACK_API_V1
@ -109,7 +108,6 @@ class ListToolDefsResponse(BaseModel):
@runtime_checkable
@telemetry_traceable
class ToolGroups(Protocol):
@webmethod(route="/toolgroups", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
async def register_tool_group(
@ -191,7 +189,6 @@ class SpecialToolGroup(Enum):
@runtime_checkable
@telemetry_traceable
class ToolRuntime(Protocol):
tool_store: ToolStore | None = None

View file

@ -13,7 +13,6 @@ from typing import Annotated, Any, Literal, Protocol, runtime_checkable
from fastapi import Body, Query
from pydantic import BaseModel, Field, field_validator
from llama_stack_api.common.tracing import telemetry_traceable
from llama_stack_api.inference import InterleavedContent
from llama_stack_api.schema_utils import json_schema_type, register_schema, webmethod
from llama_stack_api.vector_stores import VectorStore
@ -572,7 +571,6 @@ class VectorStoreTable(Protocol):
@runtime_checkable
@telemetry_traceable
class VectorIO(Protocol):
vector_store_table: VectorStoreTable | None = None