Skip to content

Commit 2d536f4

Browse files
authored
feat(common): more otel fields (#2087)
* feat(common): more otel fields * types * docs
1 parent 5376867 commit 2d536f4

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

common/src/models/telemetry.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,21 @@ impl Default for LogfireConfig {
216216
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
217217
#[typeshare::typeshare]
218218
pub struct GenericOtelConfig {
219+
/// Endpoint for the exporter to target
219220
pub endpoint: String,
220-
pub bearer_token: String,
221+
/// Set either the full authorization header or just the bearer token
222+
pub authorization: Option<String>,
223+
/// Set either the full authorization header or just the bearer token
224+
pub bearer_token: Option<String>,
225+
/// Add http/grpc compression to exporter. Example: gzip
226+
pub compression: Option<String>,
227+
/// true: otlp, false: otlphttp
221228
pub grpc: bool,
229+
/// Enable logs pipeline (if included in tier)
222230
pub logs: bool,
231+
/// Enable traces pipeline (if included in tier)
223232
pub traces: bool,
233+
/// Enable metrics pipeline
224234
pub metrics: bool,
225235
}
226236

@@ -229,7 +239,9 @@ impl Default for GenericOtelConfig {
229239
fn default() -> Self {
230240
Self {
231241
endpoint: "https://host.host/".into(),
232-
bearer_token: "bearer".into(),
242+
authorization: None,
243+
bearer_token: Some("bearer".into()),
244+
compression: Some("gzip".into()),
233245
grpc: true,
234246
logs: true,
235247
traces: true,

common/types.ts

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)