Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
157 changes: 150 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,602 changes: 1,598 additions & 4 deletions LICENSE-3rdparty.yml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion cmake/DatadogConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ if(Datadog_FOUND)
Secur32
Ncrypt
PowrProf
Version)
Version
iphlpapi)
Copy link
Member

Choose a reason for hiding this comment

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

This part I'm not confident at all in -- maybe worth confirming with @gleocadie that this new dll dependency is fine?

endif()

add_library(Datadog::Profiling ALIAS ${DD_LIB_NAME})
Expand Down
1 change: 1 addition & 0 deletions datadog-remote-config/examples/remote_config_fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ async fn main() {
api_key: None,
timeout_ms: 5000, // custom timeout, defaults to 3 seconds
test_token: None,
..Default::default()
},
},
products: vec![ApmTracing],
Expand Down
13 changes: 10 additions & 3 deletions examples/cxx/build-and-run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,16 @@ if ($USE_MSVC) {
$CXX_BRIDGE_LIB,
# Note: when linking Rust staticlibs from C++, native system libraries that Rust
# would normally link automatically for Rust binaries must be provided here.
#
# `rustls-platform-verifier` uses the Windows certificate APIs (Cert*), which live in Crypt32.
"ws2_32.lib", "advapi32.lib", "userenv.lib", "ntdll.lib", "bcrypt.lib", "ole32.lib", "crypt32.lib"
"advapi32.lib",
"bcrypt.lib",
# `rustls-platform-verifier` uses the Windows certificate APIs (Cert*), which live in Crypt32
"crypt32.lib",
# `hickory-resolver` uses GetAdaptersAddresses, which lives in iphlpapi.
"iphlpapi.lib",
"ntdll.lib",
"ole32.lib",
"userenv.lib",
"ws2_32.lib"
Comment on lines -149 to +158
Copy link
Member

Choose a reason for hiding this comment

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

(Note to other reviewers -- same list of libraries reordered, with only iphlpapi.lib being new)

)

# Add extra MSVC libraries if specified
Expand Down
3 changes: 2 additions & 1 deletion examples/cxx/exporter_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ int main(int argc, char *argv[]) {
},
"datadoghq.com",
api_key,
10000
10000,
false
)
: ProfileExporter::create_file_exporter(
"libdatadog-example",
Expand Down
4 changes: 2 additions & 2 deletions examples/cxx/profiling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ int main() {
Tag{.key = "env", .value = "dev"},
Tag{.key = "example", .value = "cxx"}
},
dd_site.c_str(), api_key, 10000
dd_site.c_str(), api_key, 10000, false
)
);
} else if (agent_url) {
Expand All @@ -210,7 +210,7 @@ int main() {
Tag{.key = "env", .value = "dev"},
Tag{.key = "example", .value = "cxx"}
},
agent_url, 10000
agent_url, 10000, false
)
);
} else {
Expand Down
6 changes: 3 additions & 3 deletions examples/ffi/exporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ int main(int argc, char *argv[]) {

auto *encoded_profile = &serialize_result.ok;

// Set a custom timeout of 10000ms (10 seconds) instead of the default 3000ms
auto endpoint =
ddog_prof_Endpoint_agentless(DDOG_CHARSLICE_C_BARE("datad0g.com"), to_slice_c_char(api_key), 10000);
// Set a custom timeout of 10000ms (10 seconds); use_system_resolver = false (hickory DNS)
auto endpoint = ddog_prof_Endpoint_agentless(
DDOG_CHARSLICE_C_BARE("datad0g.com"), to_slice_c_char(api_key), 10000, false);

ddog_Vec_Tag tags = ddog_Vec_Tag_new();
ddog_Vec_Tag_PushResult tag_result =
Expand Down
10 changes: 10 additions & 0 deletions libdd-common-ffi/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ extern "C" fn ddog_endpoint_set_test_token(endpoint: &mut Endpoint, token: crate
};
}

/// Set whether to use the system DNS resolver instead of hickory-dns when building the reqwest
/// client.
#[no_mangle]
pub extern "C" fn ddog_endpoint_set_use_system_resolver(
endpoint: &mut Endpoint,
use_system_resolver: bool,
) {
endpoint.use_system_resolver = use_system_resolver;
}

#[no_mangle]
pub extern "C" fn ddog_endpoint_drop(_: Box<Endpoint>) {}

Expand Down
Loading
Loading