MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / logs_request

Function logs_request

src/instruments/otel/rows.rs:360–396  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

358 }
359
360 pub fn logs_request() -> ExportLogsServiceRequest {
361 let record = LogRecord {
362 observed_time_unix_nano: START + 60,
363 severity_number: 9,
364 severity_text: "INFO".into(),
365 event_name: "event benches/example.rs:9".into(),
366 body: Some(string_value("parsed values")),
367 attributes: vec![
368 key_value(
369 "count",
370 AnyValue {
371 value: Some(any_value::Value::IntValue(3)),
372 },
373 ),
374 key_value(
375 MONOTONIC_TIME_ATTRIBUTE,
376 AnyValue {
377 value: Some(any_value::Value::IntValue(MONOTONIC_START as i64 + 60)),
378 },
379 ),
380 ],
381 trace_id: vec![0xab; 16],
382 span_id: vec![0x01; 8],
383 ..Default::default()
384 };
385 ExportLogsServiceRequest {
386 resource_logs: vec![ResourceLogs {
387 resource: resource(),
388 scope_logs: vec![ScopeLogs {
389 scope: scope(),
390 log_records: vec![record],
391 ..Default::default()
392 }],
393 ..Default::default()
394 }],
395 }
396 }
397
398 fn strings(attributes: &[(&str, &str)]) -> Attributes {
399 attributes

Calls 1

string_valueFunction · 0.85