Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions rust/otap-dataflow/crates/pdata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@ workspace = true

[features]
bench = []
testing = []

[[bench]]
name = "concatenate"
harness = false
required-features = ["testing"]

[[bench]]
name = "sort_by_parent_then_id"
harness = false
required-features = ["testing"]
2 changes: 1 addition & 1 deletion rust/otap-dataflow/crates/pdata/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ pub enum Error {

#[error(
"Column `{name}` type mismatch in payload {payload_type:?}, \
expected OTAP type {expected:?}, actual: {actual}"
expected OTAP type {expected:?}, actual: {actual}"
)]
FieldTypeMismatch {
name: String,
Expand Down
2 changes: 1 addition & 1 deletion rust/otap-dataflow/crates/pdata/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub use otlp::OtlpProtoBytes;
pub use payload::{OtapPayload, OtapPayloadHelpers};

/// Testing support
// #[cfg(test)] ?
#[cfg(any(test, feature = "testing"))]
pub mod testing;

// The validation module is only used for integration tests with the OpenTelemetry Collector.
Expand Down
6 changes: 5 additions & 1 deletion rust/otap-dataflow/crates/pdata/src/otap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ pub mod schema;
#[allow(missing_docs)]
pub mod transform;

/// Testing utilities for constructing OTAP batches in tests.
#[cfg(any(test, feature = "testing"))]
pub mod testing;

/// The OtapBatch enum is used to represent a batch of OTAP data.
#[derive(Clone, Debug, PartialEq)]
#[allow(clippy::large_enum_variant)]
Expand Down Expand Up @@ -180,7 +184,7 @@ impl From<Traces> for OtapArrowRecords {
/// storing and retrieving Arrow record batches in a type-safe manner. It is
/// implemented by various structs that represent each signal type and provides
/// methods to efficiently set and get record batches.
pub trait OtapBatchStore: Default + Clone {
pub trait OtapBatchStore: Default + Clone + Into<OtapArrowRecords> {
/// Internally, implementers should use a bitmask for the types they support.
/// The offsets in the bitmask should correspond to the ArrowPayloadType enum values.
const TYPE_MASK: u64;
Expand Down
Loading
Loading