Skip to content

Commit d329dcf

Browse files
committed
Merge branch 'master' of github.com:DataDog/dd-trace-php into leiyks-use-rust-span-in-tracer
2 parents c3c9b98 + 91222ad commit d329dcf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+536
-259
lines changed

.gitlab/generate-package.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@
488488
IMAGE: "<?= $image ?>"
489489
ABI_NO: "<?= $abi_no ?>"
490490
PHP_VERSION: "<?= $major_minor ?>"
491+
GIT_STRATEGY: clone
491492
GIT_CONFIG_COUNT: 1
492493
GIT_CONFIG_KEY_0: core.longpaths
493494
GIT_CONFIG_VALUE_0: true

.gitlab/generate-tracer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ function before_script_steps() {
120120
GIT_CONFIG_KEY_0: core.longpaths
121121
GIT_CONFIG_VALUE_0: true
122122
CONTAINER_NAME: $CI_JOB_NAME_SLUG
123+
GIT_STRATEGY: clone
123124
IMAGE: "registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:php-${PHP_MAJOR_MINOR}_windows"
124125
script: |
125126
# Make sure we actually fail if a command fails

.gitlab/run_php_language_tests.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ if [[ -n "${PHP_MAJOR_MINOR}" && $(version $PHP_MAJOR_MINOR) -ge $(version 7.4)
3333
extra_args="-j$(nproc)"
3434
fi
3535

36+
# run-tests supports flaky since 8.1
37+
if [[ -n "${PHP_MAJOR_MINOR}" && $(version $PHP_MAJOR_MINOR) -ge $(version 8.1) ]]; then
38+
sed -i "/flaky_functions = /a 'socket_create','stream_context_create'," run-tests.php
39+
fi
40+
3641
php run-tests.php -q \
3742
-p /usr/local/bin/php \
3843
--show-diff \

Cargo.lock

Lines changed: 46 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components-rs/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ regex = "1.10.5"
4848
regex-automata = "0.4.5"
4949
http = "1.0"
5050
libc = "0.2"
51+
bincode = { version = "1.3.3" }
52+
hashbrown = "0.15"
5153

5254
[build-dependencies]
5355
cbindgen = "0.27"

components-rs/common.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@ typedef struct ddog_DebuggerPayload ddog_DebuggerPayload;
396396

397397
typedef struct ddog_DslString ddog_DslString;
398398

399+
typedef struct ddog_HashMap_ShmCacheKey__ShmCache ddog_HashMap_ShmCacheKey__ShmCache;
400+
399401
/**
400402
* `InstanceId` is a structure that holds session and runtime identifiers.
401403
*/
@@ -603,6 +605,8 @@ typedef struct ddog_Vec_DebuggerPayload {
603605
uintptr_t capacity;
604606
} ddog_Vec_DebuggerPayload;
605607

608+
typedef struct ddog_HashMap_ShmCacheKey__ShmCache ddog_ShmCacheMap;
609+
606610
/**
607611
* Holds the raw parts of a Rust Vec; it should only be created from Rust,
608612
* never from C.

components-rs/ddtrace.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,22 @@ void ddog_sidecar_telemetry_add_integration_log_buffer(enum ddog_Log category,
282282
struct ddog_SidecarActionsBuffer *buffer,
283283
ddog_CharSlice log);
284284

285+
ddog_ShmCacheMap *ddog_sidecar_telemetry_cache_new(void);
286+
287+
void ddog_sidecar_telemetry_cache_drop(ddog_ShmCacheMap*);
288+
289+
bool ddog_sidecar_telemetry_config_sent(const ddog_ShmCacheMap *cache,
290+
ddog_CharSlice service,
291+
ddog_CharSlice env);
292+
293+
ddog_MaybeError ddog_sidecar_telemetry_filter_flush(struct ddog_SidecarTransport **transport,
294+
const struct ddog_InstanceId *instance_id,
295+
const ddog_QueueId *queue_id,
296+
struct ddog_SidecarActionsBuffer *buffer,
297+
ddog_ShmCacheMap *cache,
298+
ddog_CharSlice service,
299+
ddog_CharSlice env);
300+
285301
void ddog_init_span_func(void (*free_func)(struct _zend_string*),
286302
void (*addref_func)(struct _zend_string*));
287303

components-rs/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub mod telemetry;
99
pub mod bytes;
1010

1111
use ddcommon::entity_id::{get_container_id, set_cgroup_file};
12-
use http::uri::Scheme;
12+
use http::uri::{PathAndQuery, Scheme};
1313
use http::Uri;
1414
use std::borrow::Cow;
1515
use std::ffi::c_char;
@@ -91,6 +91,9 @@ pub unsafe extern "C" fn ddtrace_parse_agent_url(
9191
if url.scheme().is_none() {
9292
let mut parts = url.into_parts();
9393
parts.scheme = Some(Scheme::HTTP);
94+
if parts.path_and_query.is_none() {
95+
parts.path_and_query = Some(PathAndQuery::from_static("/"));
96+
}
9497
url = Uri::from_parts(parts).unwrap();
9598
}
9699
Box::new(Endpoint::from_url(url))

0 commit comments

Comments
 (0)