mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 04:02:36 +00:00
fix(major::pr): re-architect instrumentation library
This commit is contained in:
parent
7e3cf1fb20
commit
8fe3a25158
21 changed files with 422 additions and 462 deletions
27
llama_stack/providers/inline/instrumentation/otel/config.py
Normal file
27
llama_stack/providers/inline/instrumentation/otel/config.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# 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 typing import Literal
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class OTelConfig(BaseModel):
|
||||
"""
|
||||
OpenTelemetry instrumentation configuration.
|
||||
|
||||
Most OTel settings use environment variables (OTEL_*).
|
||||
See: https://opentelemetry.io/docs/specs/otel/configuration/sdk-configuration-variables/
|
||||
"""
|
||||
|
||||
service_name: str | None = Field(
|
||||
default=None,
|
||||
description="Service name (overridden by OTEL_SERVICE_NAME env var)",
|
||||
)
|
||||
span_processor: Literal["batch", "simple"] = Field(
|
||||
default="batch",
|
||||
description="Span processor type (overridden by OTEL_SPAN_PROCESSOR env var)",
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue