Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
14 changes: 7 additions & 7 deletions dd-trace-propagation/src/datadog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ use dd_trace::{
};

// Datadog Keys
const DATADOG_HIGHER_ORDER_TRACE_ID_BITS_KEY: &str = "_dd.p.tid";
const DATADOG_TRACE_ID_KEY: &str = "x-datadog-trace-id";
const DATADOG_ORIGIN_KEY: &str = "x-datadog-origin";
const DATADOG_PARENT_ID_KEY: &str = "x-datadog-parent-id";
const DATADOG_SAMPLING_PRIORITY_KEY: &str = "x-datadog-sampling-priority";
const DATADOG_TAGS_KEY: &str = "x-datadog-tags";
const DATADOG_PROPAGATION_ERROR_KEY: &str = "_dd.propagation_error";
pub const DATADOG_HIGHER_ORDER_TRACE_ID_BITS_KEY: &str = "_dd.p.tid";
pub const DATADOG_TRACE_ID_KEY: &str = "x-datadog-trace-id";
pub const DATADOG_ORIGIN_KEY: &str = "x-datadog-origin";
pub const DATADOG_PARENT_ID_KEY: &str = "x-datadog-parent-id";
pub const DATADOG_SAMPLING_PRIORITY_KEY: &str = "x-datadog-sampling-priority";
pub const DATADOG_TAGS_KEY: &str = "x-datadog-tags";
pub const DATADOG_PROPAGATION_ERROR_KEY: &str = "_dd.propagation_error";
Comment on lines +24 to +30
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if it would be better to export some of this as constants so that the import is not dd_trace_propgation::datadog::{...} but just dd_trace_propagation::constants::{...}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep them in the datadog namespace.

pub const DATADOG_LAST_PARENT_ID_KEY: &str = "_dd.parent_id";

// TODO: get max_length from config: DD_TRACE_X_DATADOG_TAGS_MAX_LENGTH
Expand Down
2 changes: 1 addition & 1 deletion dd-trace-propagation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use tracecontext::TRACESTATE_KEY;
pub mod carrier;
pub mod config;
pub mod context;
mod datadog;
pub mod datadog;
mod error;
pub mod trace_propagation_style;
pub mod tracecontext;
Expand Down
Loading