mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-02 08:44:44 +00:00
add sample run config
This commit is contained in:
parent
78348b76d1
commit
d5e66e107f
1 changed files with 18 additions and 3 deletions
|
@ -4,9 +4,24 @@
|
||||||
# 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 pydantic import BaseModel
|
from typing import Any, Dict
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
class OpenTelemetryConfig(BaseModel):
|
class OpenTelemetryConfig(BaseModel):
|
||||||
otel_endpoint: str = "http://localhost:4318/v1/traces"
|
otel_endpoint: str = Field(
|
||||||
service_name: str = "llama-stack"
|
default="http://localhost:4318/v1/traces",
|
||||||
|
description="The OpenTelemetry collector endpoint URL",
|
||||||
|
)
|
||||||
|
service_name: str = Field(
|
||||||
|
default="llama-stack",
|
||||||
|
description="The service name to use for telemetry",
|
||||||
|
)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def sample_run_config(cls, **kwargs) -> Dict[str, Any]:
|
||||||
|
return {
|
||||||
|
"otel_endpoint": "${env.OTEL_ENDPOINT:http://localhost:4318/v1/traces}",
|
||||||
|
"service_name": "${env.OTEL_SERVICE_NAME:llama-stack}",
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue