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

Function configure

agentops/__init__.py:176–224  ·  view source on GitHub ↗

Update client configuration Args: **kwargs: Configuration parameters. Supported parameters include: - api_key: API Key for AgentOps services - endpoint: The endpoint for the AgentOps service - app_url: The dashboard URL for the AgentOps app

(**kwargs)

Source from the content-addressed store, hash-verified

174
175
176def configure(**kwargs):
177 """Update client configuration
178
179 Args:
180 **kwargs: Configuration parameters. Supported parameters include:
181 - api_key: API Key for AgentOps services
182 - endpoint: The endpoint for the AgentOps service
183 - app_url: The dashboard URL for the AgentOps app
184 - max_wait_time: Maximum time to wait in milliseconds before flushing the queue
185 - max_queue_size: Maximum size of the event queue
186 - default_tags: Default tags for the sessions
187 - instrument_llm_calls: Whether to instrument LLM calls
188 - auto_start_session: Whether to start a session automatically
189 - skip_auto_end_session: Don't automatically end session
190 - env_data_opt_out: Whether to opt out of collecting environment data
191 - log_level: The log level to use for the client
192 - fail_safe: Whether to suppress errors and continue execution
193 - exporter: Custom span exporter for OpenTelemetry trace data
194 - processor: Custom span processor for OpenTelemetry trace data
195 - exporter_endpoint: Endpoint for the exporter
196 """
197 global _client
198
199 # List of valid parameters that can be passed to configure
200 valid_params = {
201 "api_key",
202 "endpoint",
203 "app_url",
204 "max_wait_time",
205 "max_queue_size",
206 "default_tags",
207 "instrument_llm_calls",
208 "auto_start_session",
209 "skip_auto_end_session",
210 "env_data_opt_out",
211 "log_level",
212 "fail_safe",
213 "exporter",
214 "processor",
215 "exporter_endpoint",
216 }
217
218 # Check for invalid parameters
219 invalid_params = set(kwargs.keys()) - valid_params
220 if invalid_params:
221 logger.warning(f"Invalid configuration parameters: {invalid_params}")
222
223 client = get_client()
224 client.configure(**kwargs)
225
226
227def start_trace(

Callers

nothing calls this directly

Calls 2

get_clientFunction · 0.70
configureMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…