mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-03 09:21:45 +00:00
telemetry & sample
This commit is contained in:
parent
c4b9b3cb52
commit
71d50ab368
3 changed files with 18 additions and 10 deletions
|
@ -17,6 +17,22 @@ from opentelemetry.sdk.trace import TracerProvider
|
||||||
from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
||||||
from opentelemetry.semconv.resource import ResourceAttributes
|
from opentelemetry.semconv.resource import ResourceAttributes
|
||||||
|
|
||||||
|
from llama_stack.apis.telemetry import (
|
||||||
|
Event,
|
||||||
|
MetricEvent,
|
||||||
|
QueryCondition,
|
||||||
|
SpanEndPayload,
|
||||||
|
SpanStartPayload,
|
||||||
|
SpanStatus,
|
||||||
|
SpanWithStatus,
|
||||||
|
StructuredLogEvent,
|
||||||
|
Telemetry,
|
||||||
|
Trace,
|
||||||
|
UnstructuredLogEvent,
|
||||||
|
)
|
||||||
|
|
||||||
|
from llama_stack.distribution.datatypes import Api
|
||||||
|
|
||||||
from llama_stack.providers.inline.telemetry.meta_reference.console_span_processor import (
|
from llama_stack.providers.inline.telemetry.meta_reference.console_span_processor import (
|
||||||
ConsoleSpanProcessor,
|
ConsoleSpanProcessor,
|
||||||
)
|
)
|
||||||
|
@ -27,10 +43,6 @@ from llama_stack.providers.inline.telemetry.meta_reference.sqlite_span_processor
|
||||||
from llama_stack.providers.utils.telemetry.dataset_mixin import TelemetryDatasetMixin
|
from llama_stack.providers.utils.telemetry.dataset_mixin import TelemetryDatasetMixin
|
||||||
from llama_stack.providers.utils.telemetry.sqlite_trace_store import SQLiteTraceStore
|
from llama_stack.providers.utils.telemetry.sqlite_trace_store import SQLiteTraceStore
|
||||||
|
|
||||||
from llama_stack.apis.telemetry import * # noqa: F403
|
|
||||||
|
|
||||||
from llama_stack.distribution.datatypes import Api
|
|
||||||
|
|
||||||
from .config import TelemetryConfig, TelemetrySink
|
from .config import TelemetryConfig, TelemetrySink
|
||||||
|
|
||||||
_GLOBAL_STORAGE = {
|
_GLOBAL_STORAGE = {
|
||||||
|
|
|
@ -4,12 +4,10 @@
|
||||||
# This source code is licensed under the terms described in the LICENSE file in
|
# This source code is licensed under the terms described in the LICENSE file in
|
||||||
# the root directory of this source tree.
|
# the root directory of this source tree.
|
||||||
|
|
||||||
|
from llama_stack.apis.telemetry import Telemetry
|
||||||
from .config import SampleConfig
|
from .config import SampleConfig
|
||||||
|
|
||||||
|
|
||||||
from llama_stack.apis.telemetry import * # noqa: F403
|
|
||||||
|
|
||||||
|
|
||||||
class SampleTelemetryImpl(Telemetry):
|
class SampleTelemetryImpl(Telemetry):
|
||||||
def __init__(self, config: SampleConfig):
|
def __init__(self, config: SampleConfig):
|
||||||
self.config = config
|
self.config = config
|
||||||
|
|
|
@ -4,12 +4,10 @@
|
||||||
# This source code is licensed under the terms described in the LICENSE file in
|
# This source code is licensed under the terms described in the LICENSE file in
|
||||||
# the root directory of this source tree.
|
# the root directory of this source tree.
|
||||||
|
|
||||||
|
from llama_stack.apis.agents import Agents
|
||||||
from .config import SampleConfig
|
from .config import SampleConfig
|
||||||
|
|
||||||
|
|
||||||
from llama_stack.apis.agents import * # noqa: F403
|
|
||||||
|
|
||||||
|
|
||||||
class SampleAgentsImpl(Agents):
|
class SampleAgentsImpl(Agents):
|
||||||
def __init__(self, config: SampleConfig):
|
def __init__(self, config: SampleConfig):
|
||||||
self.config = config
|
self.config = config
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue