mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
feat(major): move new telemetry architecture into new provider
This commit is contained in:
parent
ce3a804893
commit
e45e77f7b0
10 changed files with 207 additions and 52 deletions
4
llama_stack/core/telemetry/__init__.py
Normal file
4
llama_stack/core/telemetry/__init__.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the terms described in the LICENSE file in
|
||||
# the root directory of this source tree.
|
20
llama_stack/core/telemetry/tracing.py
Normal file
20
llama_stack/core/telemetry/tracing.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# 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.
|
||||
from abc import abstractmethod
|
||||
from fastapi import FastAPI
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class TelemetryProvider(BaseModel):
|
||||
"""
|
||||
TelemetryProvider standardizes how telemetry is provided to the application.
|
||||
"""
|
||||
@abstractmethod
|
||||
def fastapi_middleware(self, app: FastAPI, *args, **kwargs):
|
||||
"""
|
||||
Injects FastAPI middleware that instruments the application for telemetry.
|
||||
"""
|
||||
...
|
Loading…
Add table
Add a link
Reference in a new issue