Skip to content

Commit

Permalink
resolve todo
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgajg1134 committed Sep 18, 2024
1 parent 7945997 commit dc3a673
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data-pipeline/src/trace_exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ use datadog_trace_utils::tracer_payload::TraceEncoding;
use ddcommon::tag::Tag;
use ddcommon::{connector, tag, Endpoint};
use dogstatsd_client::{new_flusher, DogStatsDAction, Flusher};
use either::Either;
use hyper::http::uri::PathAndQuery;
use hyper::{http, Body, Client, Method, Uri};
use log::error;
use std::{borrow::Borrow, collections::HashMap, str::FromStr};
use tokio::runtime::Runtime;
use either::Either;

/// TraceExporterInputFormat represents the format of the input traces.
/// The input format can be either Proxy or V0.4, where V0.4 is the default.
Expand Down
8 changes: 6 additions & 2 deletions dogstatsd-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ use std::os::unix::net::UnixDatagram;
const QUEUE_SIZE: usize = 32 * 1024;

/// The `DogStatsDActionOwned` enum gathers the metric types that can be sent to the DogStatsD
/// server. This type takes ownership of the relevant data to support the sidecar better
/// TODO: writeup why combining these types is FRAUGHT
/// server. This type takes ownership of the relevant data to support the sidecar better.
///
/// Originally I attempted to combine this type with `DogStatsDAction` but this GREATLY complicates
/// the types to the point of insanity. I was unable to come up with a satisfactory approach that
/// allows both the data-pipeline and sidecar crates to use the same type. If a future rustacean
/// wants to take a stab and open a PR please do so!
#[derive(Debug, Serialize, Deserialize)]
pub enum DogStatsDActionOwned {
Count(String, i64, Vec<Tag>),
Expand Down

0 comments on commit dc3a673

Please sign in to comment.