You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Make telemetry configurable
Also allows opting-out of the OTLP exporter to remove the dependency to protoc when building.
This commit is contained in:
@@ -21,6 +21,7 @@ mod csrf;
|
||||
mod database;
|
||||
mod http;
|
||||
mod oauth2;
|
||||
mod telemetry;
|
||||
mod templates;
|
||||
mod util;
|
||||
|
||||
@@ -30,6 +31,7 @@ pub use self::{
|
||||
database::DatabaseConfig,
|
||||
http::HttpConfig,
|
||||
oauth2::{Algorithm, KeySet, OAuth2ClientConfig, OAuth2Config},
|
||||
telemetry::{MetricsConfig, TelemetryConfig, TracingConfig},
|
||||
templates::TemplatesConfig,
|
||||
util::ConfigurationSection,
|
||||
};
|
||||
@@ -46,6 +48,9 @@ pub struct RootConfig {
|
||||
|
||||
pub cookies: CookiesConfig,
|
||||
|
||||
#[serde(default)]
|
||||
pub telemetry: TelemetryConfig,
|
||||
|
||||
#[serde(default)]
|
||||
pub templates: TemplatesConfig,
|
||||
|
||||
@@ -65,6 +70,7 @@ impl ConfigurationSection<'_> for RootConfig {
|
||||
http: HttpConfig::generate().await?,
|
||||
database: DatabaseConfig::generate().await?,
|
||||
cookies: CookiesConfig::generate().await?,
|
||||
telemetry: TelemetryConfig::generate().await?,
|
||||
templates: TemplatesConfig::generate().await?,
|
||||
csrf: CsrfConfig::generate().await?,
|
||||
})
|
||||
@@ -76,6 +82,7 @@ impl ConfigurationSection<'_> for RootConfig {
|
||||
http: HttpConfig::test(),
|
||||
database: DatabaseConfig::test(),
|
||||
cookies: CookiesConfig::test(),
|
||||
telemetry: TelemetryConfig::test(),
|
||||
templates: TemplatesConfig::test(),
|
||||
csrf: CsrfConfig::test(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user