pub struct DatadogConfig {
pub api_key: SecretString,
pub app_key: SecretString,
pub site: String,
pub retry_config: RetryConfig,
pub http_config: HttpConfig,
pub unstable_operations: Vec<String>,
/* private fields */
}Expand description
Datadog API configuration containing credentials and regional settings.
Fields§
§api_key: SecretStringDatadog API key for authentication
app_key: SecretStringDatadog application key for authentication
site: StringDatadog site/region (defaults to datadoghq.com)
retry_config: RetryConfigRetry configuration
http_config: HttpConfigHTTP client configuration (timeouts, connection pool)
unstable_operations: Vec<String>List of unstable operations that require the DD-OPERATION-UNSTABLE header
Implementations§
Source§impl DatadogConfig
impl DatadogConfig
Sourcepub fn new(api_key: String, application_key: String) -> Self
pub fn new(api_key: String, application_key: String) -> Self
Creates a new Datadog configuration with the specified credentials.
Uses the default site (datadoghq.com / US1 region).
Sourcepub fn with_base_url(self, base_url: String) -> Self
pub fn with_base_url(self, base_url: String) -> Self
Sets a custom base URL (for testing with mock servers).
Sourcepub fn base_url(&self) -> String
pub fn base_url(&self) -> String
Returns the full API base URL for the configured Datadog site.
Sourcepub fn from_env_or_file() -> Result<Self>
pub fn from_env_or_file() -> Result<Self>
Attempt to load credentials from ~/.datadog-mcp/credentials.json, falling back to env vars.
Sourcepub fn from_keyring() -> Result<Self>
pub fn from_keyring() -> Result<Self>
Load configuration from the system keyring entry, if present.
Profile defaults to DD_PROFILE or default.
Sourcepub fn store_in_keyring(&self) -> Result<()>
pub fn store_in_keyring(&self) -> Result<()>
Store the current configuration in the system keyring entry.
Profile defaults to DD_PROFILE or default.
Trait Implementations§
Source§impl Clone for DatadogConfig
impl Clone for DatadogConfig
Source§fn clone(&self) -> DatadogConfig
fn clone(&self) -> DatadogConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more