Skip to content

Commit

Permalink
Move GIT_META_TAGS_COUNT to top of file
Browse files Browse the repository at this point in the history
  • Loading branch information
Hartigan authored and hdost committed Dec 19, 2023
1 parent 7c92e39 commit a3e0d18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opentelemetry-datadog/src/exporter/model/v05.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use std::time::SystemTime;
use super::unified_tags::{UnifiedTagField, UnifiedTags};

const SPAN_NUM_ELEMENTS: u32 = 12;
const GIT_META_TAGS_COUNT: u32 = if matches!((option_env!("DD_GIT_REPOSITORY_URL"), option_env!("DD_GIT_COMMIT_SHA")), (Some(_), Some(_))) { 2 } else { 0 };

// Protocol documentation sourced from https://github.com/DataDog/datadog-agent/blob/c076ea9a1ffbde4c76d35343dbc32aecbbf99cb9/pkg/trace/api/version.go
//
Expand Down Expand Up @@ -189,7 +190,6 @@ where
},
)?;

const GIT_META_TAGS_COUNT: u32 = if matches!((option_env!("DD_GIT_REPOSITORY_URL"), option_env!("DD_GIT_COMMIT_SHA")), (Some(_), Some(_))) { 2 } else { 0 };
rmp::encode::write_map_len(
&mut encoded,
(span.attributes.len() + span.resource.len()) as u32
Expand Down

0 comments on commit a3e0d18

Please sign in to comment.