Skip to content

Commit

Permalink
reformat file
Browse files Browse the repository at this point in the history
  • Loading branch information
nina9753 committed Dec 11, 2024
1 parent 33552b9 commit baec2d0
Showing 1 changed file with 25 additions and 27 deletions.
52 changes: 25 additions & 27 deletions trace-mini-agent/src/trace_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ impl TraceProcessor for ServerlessTraceProcessor {
mod tests {
use datadog_trace_obfuscation::obfuscation_config::ObfuscationConfig;
use hyper::Request;
use std::{collections::HashMap, sync::Arc, time::UNIX_EPOCH};
use serde_json::json;
use std::{collections::HashMap, sync::Arc, time::UNIX_EPOCH};
use tokio::sync::mpsc::{self, Receiver, Sender};

use crate::{
Expand All @@ -138,9 +138,7 @@ mod tests {
use datadog_trace_utils::test_utils::create_test_gcp_span;
use datadog_trace_utils::trace_utils::MiniAgentMetadata;
use datadog_trace_utils::{
test_utils::create_test_json_span,
trace_utils,
tracer_payload::TracerPayloadCollection,
test_utils::create_test_json_span, trace_utils, tracer_payload::TracerPayloadCollection,
};
use ddcommon::Endpoint;

Expand All @@ -155,30 +153,30 @@ mod tests {
start: i64,
) -> serde_json::Value {
json!(
{
"trace_id": trace_id,
"span_id": span_id,
"service": "test-service",
"functionname": "dummy_function_name",
"name": "test_name",
"resource": "test-resource",
"parent_id": parent_id,
"start": start,
"duration": 5,
"error": 0,
"meta": {
{
"trace_id": trace_id,
"span_id": span_id,
"service": "test-service",
"env": "test-env",
"runtime-id": "test-runtime-id-value",
"gcrfx.project_id": "dummy_project_id",
"_dd.mini_agent_version": "dummy_version",
"_dd.gcrfx.resource_name": "projects/dummy_project_id/locations/dummy_region_west/functions/dummy_function_name",
"gcrfx.location": "dummy_region_west"
},
"metrics": {},
"meta_struct": {},
}
)
"functionname": "dummy_function_name",
"name": "test_name",
"resource": "test-resource",
"parent_id": parent_id,
"start": start,
"duration": 5,
"error": 0,
"meta": {
"service": "test-service",
"env": "test-env",
"runtime-id": "test-runtime-id-value",
"gcrfx.project_id": "dummy_project_id",
"_dd.mini_agent_version": "dummy_version",
"_dd.gcrfx.resource_name": "projects/dummy_project_id/locations/dummy_region_west/functions/dummy_function_name",
"gcrfx.location": "dummy_region_west"
},
"metrics": {},
"meta_struct": {},
}
)
}

fn create_test_config() -> Config {
Expand Down

0 comments on commit baec2d0

Please sign in to comment.