Skip to content

Commit

Permalink
Rename version to app_version
Browse files Browse the repository at this point in the history
  • Loading branch information
VianneyRuhlmann committed Nov 6, 2024
1 parent 113aa3f commit f6cdd9f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion data-pipeline-ffi/src/trace_exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub unsafe extern "C" fn ddog_trace_exporter_new(
.set_language_interpreter(language_interpreter.to_utf8_lossy().as_ref())
.set_hostname(hostname.to_utf8_lossy().as_ref())
.set_env(env.to_utf8_lossy().as_ref())
.set_version(version.to_utf8_lossy().as_ref())
.set_app_version(version.to_utf8_lossy().as_ref())
.set_service(service.to_utf8_lossy().as_ref())
.set_input_format(input_format)
.set_output_format(output_format)
Expand Down
4 changes: 2 additions & 2 deletions data-pipeline/src/stats_exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ fn encode_stats_payload(
hostname: meta.hostname.clone(),
env: meta.env.clone(),
lang: meta.language.clone(),
version: meta.version.clone(),
version: meta.app_version.clone(),
runtime_id: meta.runtime_id.clone(),
tracer_version: meta.tracer_version.clone(),
service: meta.service.clone(),
Expand Down Expand Up @@ -209,7 +209,7 @@ mod tests {
TracerMetadata {
hostname: "libdatadog-test".into(),
env: "test".into(),
version: "0.0.0".into(),
app_version: "0.0.0".into(),
language: "rust".into(),
tracer_version: "0.0.0".into(),
runtime_id: "e39d6d12-0752-489f-b488-cf80006c0378".into(),
Expand Down
11 changes: 6 additions & 5 deletions data-pipeline/src/trace_exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ fn drop_chunks(traces: &mut Vec<Vec<pb::Span>>) -> DroppedP0Counts {
pub struct TracerMetadata {
pub hostname: String,
pub env: String,
pub version: String,
pub app_version: String,
pub runtime_id: String,
pub service: String,
pub tracer_version: String,
Expand Down Expand Up @@ -672,7 +672,7 @@ pub struct TraceExporterBuilder {
url: Option<String>,
hostname: String,
env: String,
version: String,
app_version: String,
service: String,
tracer_version: String,
language: String,
Expand Down Expand Up @@ -723,8 +723,9 @@ impl TraceExporterBuilder {
}

/// Set the app version which corresponds to the `version` meta tag
pub fn set_version(mut self, version: &str) -> Self {
version.clone_into(&mut self.version);
/// Only used when client-side stats is enabled
pub fn set_app_version(mut self, app_version: &str) -> Self {
app_version.clone_into(&mut self.app_version);
self
}

Expand Down Expand Up @@ -872,7 +873,7 @@ impl TraceExporterBuilder {
client_computed_top_level: self.client_computed_top_level,
hostname: self.hostname,
env: self.env,
version: self.version,
app_version: self.app_version,
runtime_id: uuid::Uuid::new_v4().to_string(),
service: self.service,
},
Expand Down

0 comments on commit f6cdd9f

Please sign in to comment.