MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / Config

Class Config

agentops/config.py:37–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36@dataclass
37class Config:
38 api_key: Optional[str] = field(
39 default_factory=lambda: os.getenv("AGENTOPS_API_KEY"),
40 metadata={"description": "API key for authentication with AgentOps services"},
41 )
42
43 endpoint: str = field(
44 default_factory=lambda: os.getenv("AGENTOPS_API_ENDPOINT", "https://api.agentops.ai"),
45 metadata={"description": "Base URL for the AgentOps API"},
46 )
47
48 app_url: str = field(
49 default_factory=lambda: os.getenv("AGENTOPS_APP_URL", "https://app.agentops.ai"),
50 metadata={"description": "Dashboard URL for the AgentOps application"},
51 )
52
53 max_wait_time: int = field(
54 default_factory=lambda: get_env_int("AGENTOPS_MAX_WAIT_TIME", 5000),
55 metadata={"description": "Maximum time in milliseconds to wait for API responses"},
56 )
57
58 export_flush_interval: int = field(
59 default_factory=lambda: get_env_int("AGENTOPS_EXPORT_FLUSH_INTERVAL", 1000),
60 metadata={"description": "Time interval in milliseconds between automatic exports of telemetry data"},
61 )
62
63 max_queue_size: int = field(
64 default_factory=lambda: get_env_int("AGENTOPS_MAX_QUEUE_SIZE", 512),
65 metadata={"description": "Maximum number of events to queue before forcing a flush"},
66 )
67
68 default_tags: Set[str] = field(
69 default_factory=lambda: get_env_list("AGENTOPS_DEFAULT_TAGS"),
70 metadata={"description": "Default tags to apply to all sessions"},
71 )
72
73 trace_name: Optional[str] = field(
74 default_factory=lambda: os.getenv("AGENTOPS_TRACE_NAME"),
75 metadata={"description": "Default name for the trace/session"},
76 )
77
78 instrument_llm_calls: bool = field(
79 default_factory=lambda: get_env_bool("AGENTOPS_INSTRUMENT_LLM_CALLS", True),
80 metadata={"description": "Whether to automatically instrument and track LLM API calls"},
81 )
82
83 auto_start_session: bool = field(
84 default_factory=lambda: get_env_bool("AGENTOPS_AUTO_START_SESSION", True),
85 metadata={"description": "Whether to automatically start a session when initializing"},
86 )
87
88 auto_init: bool = field(
89 default_factory=lambda: get_env_bool("AGENTOPS_AUTO_INIT", True),
90 metadata={"description": "Whether to automatically initialize the client on import"},
91 )
92
93 skip_auto_end_session: bool = field(
94 default_factory=lambda: get_env_bool("AGENTOPS_SKIP_AUTO_END_SESSION", False),

Callers 4

test_config_from_envFunction · 0.90
test_config_override_envFunction · 0.90
endpointFunction · 0.90
get_s3_clientFunction · 0.50

Calls 3

get_env_intFunction · 0.90
get_env_listFunction · 0.90
get_env_boolFunction · 0.90

Tested by 3

test_config_from_envFunction · 0.72
test_config_override_envFunction · 0.72
endpointFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…