mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-03 19:57:35 +00:00
20 lines
629 B
Python
20 lines
629 B
Python
# 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.
|
|
"""
|
|
...
|