Skip to content
Draft
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
67 changes: 63 additions & 4 deletions Cargo.lock

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

11 changes: 8 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ tracing-subscriber = ["tracing"]
trigger_time_sample = ["profiling"]

[dependencies]
libdd-common = { path = "libdatadog/libdd-common", features = ["cgroup_testing"] }
libdd-common = { path = "libdatadog/libdd-common", features = ["cgroup_testing", "hyper-proxy"] }
libdd-common-ffi = { path = "libdatadog/libdd-common-ffi", default-features = false, features = ["std"] }
libdd-telemetry = { path = "libdatadog/libdd-telemetry" }
libdd-telemetry-ffi = { path = "libdatadog/libdd-telemetry-ffi", default-features = false }
libdd-live-debugger = { path = "libdatadog/libdd-live-debugger" }
libdd-live-debugger-ffi = { path = "libdatadog/libdd-live-debugger-ffi", default-features = false }
libdd-ipc = { path = "libdatadog/libdd-ipc" }
datadog-ffe = { package = "libdd-ffe", path = "libdatadog/libdd-ffe" }
datadog-ffe = { package = "libdd-ffe", path = "libdatadog/libdd-ffe", features = ["cdn"] }
libdd-remote-config = { path = "libdatadog/libdd-remote-config" }
datadog-sidecar = { path = "libdatadog/datadog-sidecar" }
datadog-sidecar-ffi = { path = "libdatadog/datadog-sidecar-ffi" }
Expand Down Expand Up @@ -87,7 +87,9 @@ tempfile = "3.3"
tracing = { version = "0.1", default-features = false, features = ["std", "attributes"] }
tracing-core = "0.1.32"
tracing-subscriber = { version = "0.3", default-features = false, features = ["std", "fmt", "env-filter", "smallvec"] }
serde_json = "1.0.113"
tokio = { version = "1.36", features = ["macros", "rt", "sync", "time"] }
tokio-util = "0.7.11"
serde_json = { version = "1.0.113", features = ["raw_value"] }
regex = "1.10.5"
regex-automata = "0.4.5"
http = "1.4"
Expand Down Expand Up @@ -217,6 +219,7 @@ hex = { version = "0.4", default-features = false }
http = { version = "1.1", default-features = false }
http-body = { version = "1", default-features = false }
http-body-util = { version = "0.1", default-features = false }
httpdate = { version = "1.0", default-features = false }
# allow(workspace-deps-features): httpmock 0.8.0-alpha.1 does not compile
# without the `cookies` feature: its own `readers.rs` calls `req.cookies()`
# unconditionally while that method is gated behind `cookies`. Keep it as a
Expand Down Expand Up @@ -341,6 +344,8 @@ walkdir = { version = "2.4", default-features = false }
wasm-bindgen-futures = { version = "0.4", default-features = false }
wasm-bindgen-test = { version = "=0.3.50", default-features = false }
web-time = { version = "1", default-features = false }
webpki-roots = { version = "1.0.10", default-features = false }
webpki-root-certs = { version = "1.0.10", default-features = false }
windows = { version = "0.59.0", default-features = false }
windows-sys = { version = "0.52", default-features = false }
winver = { version = "1.0.0", default-features = false }
Expand Down
82 changes: 82 additions & 0 deletions components-rs/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,18 @@ typedef struct _zend_string _zend_string;

#define ddog_DYANMIC_CONFIG_UPDATE_UNMODIFIED (_zend_string*)1

#define ddog_DEFAULT_POLL_INTERVAL_SECONDS 30

#define ddog_MAX_POLL_INTERVAL_SECONDS 3600

#define ddog_DEFAULT_REQUEST_TIMEOUT_SECONDS 5

#define ddog_MAX_REQUEST_TIMEOUT_SECONDS 300

#define ddog_DEFAULT_INITIALIZATION_TIMEOUT_MS 10000

#define ddog_MAX_INITIALIZATION_TIMEOUT_MS (int64_t)INT32_MAX

#define ddog_LOG_ONCE (1 << 3)

/**
Expand All @@ -317,6 +329,8 @@ typedef enum ddog_ConfigurationOrigin {
DDOG_CONFIGURATION_ORIGIN_UNKNOWN,
} ddog_ConfigurationOrigin;

typedef uint8_t ddog_DeliveryState;

typedef enum ddog_DynamicConfigUpdateMode {
DDOG_DYNAMIC_CONFIG_UPDATE_MODE_READ,
DDOG_DYNAMIC_CONFIG_UPDATE_MODE_READ_WRITE,
Expand All @@ -329,6 +343,12 @@ typedef enum ddog_EvaluateAt {
DDOG_EVALUATE_AT_EXIT,
} ddog_EvaluateAt;

typedef enum ddog_FfeConfigurationSource {
DDOG_FFE_CONFIGURATION_SOURCE_DISABLED,
DDOG_FFE_CONFIGURATION_SOURCE_REMOTE_CONFIG,
DDOG_FFE_CONFIGURATION_SOURCE_AGENTLESS,
} ddog_FfeConfigurationSource;

typedef enum ddog_InBodyLocation {
DDOG_IN_BODY_LOCATION_NONE,
DDOG_IN_BODY_LOCATION_START,
Expand Down Expand Up @@ -466,6 +486,7 @@ typedef enum ddog_RemoteConfigProduct {
DDOG_REMOTE_CONFIG_PRODUCT_LIVE_DEBUGGING,
DDOG_REMOTE_CONFIG_PRODUCT_LIVE_DEBUGGING_SYMBOL_DB,
DDOG_REMOTE_CONFIG_PRODUCT_DEBUG,
DDOG_REMOTE_CONFIG_PRODUCT_APM_PROFILING,
} ddog_RemoteConfigProduct;

typedef enum ddog_SpanProbeTarget {
Expand Down Expand Up @@ -549,6 +570,35 @@ typedef struct ddog_FfeAttribute {
bool bool_value;
} ddog_FfeAttribute;

typedef struct ddog_FfeRuntimeConfig {
enum ddog_FfeConfigurationSource source;
bool enabled;
bool endpoint_valid;
} ddog_FfeRuntimeConfig;

/**
* Borrowed process settings. Strings are copied; credentials are never logged.
* The optional cleanup callback must remain valid until shutdown joins workers.
*/
typedef struct ddog_FfeSettingsInput {
bool enabled;
bool enabled_set;
ddog_CharSlice source;
bool source_set;
bool legacy_enabled;
bool legacy_enabled_set;
ddog_CharSlice agentless_base_url;
int64_t poll_interval_seconds;
int64_t request_timeout_seconds;
int64_t initialization_timeout_ms;
ddog_CharSlice site;
ddog_CharSlice api_key;
ddog_CharSlice environment;
bool sidecar_subprocess_enabled;
bool sidecar_self_telemetry;
void (*thread_cleanup)(void*);
} ddog_FfeSettingsInput;

/**
* Flags selecting which Remote Config products/capabilities to subscribe to.
*
Expand Down Expand Up @@ -1206,6 +1256,15 @@ typedef enum ddog_DynamicInstrumentationConfigState {
DDOG_DYNAMIC_INSTRUMENTATION_CONFIG_STATE_NOT_SET,
} ddog_DynamicInstrumentationConfigState;

/**
* Controls whether an EVP client stays fixed to the Agent or opts into local
* discovery and direct-intake fallback.
*/
typedef enum ddog_EvpTransportMode {
DDOG_EVP_TRANSPORT_MODE_AGENT_ONLY,
DDOG_EVP_TRANSPORT_MODE_PREFER_LOCAL_THEN_DIRECT,
} ddog_EvpTransportMode;

typedef struct ddog_AgentRemoteConfigReader ddog_AgentRemoteConfigReader;

typedef struct ddog_AgentRemoteConfigWriter_ShmHandle ddog_AgentRemoteConfigWriter_ShmHandle;
Expand Down Expand Up @@ -1267,12 +1326,29 @@ typedef struct ddog_TracerHeaderTags {
bool client_computed_stats;
} ddog_TracerHeaderTags;

/**
* Logical tracer identity attached to EVP requests.
*
* Both fields must be non-empty, valid HTTP header values no longer than 256
* bytes. This identifies the producing SDK, not the sidecar transport.
*/
typedef struct ddog_EvpProducerIdentity {
ddog_CharSlice origin;
ddog_CharSlice version;
} ddog_EvpProducerIdentity;

/**
* C representation of the context attached to Feature Flags telemetry.
*/
typedef struct ddog_FfeTelemetryContext {
ddog_CharSlice service;
ddog_CharSlice env;
ddog_CharSlice version;
} ddog_FfeTelemetryContext;

/**
* C representation of a Feature Flags exposure event.
*/
typedef struct ddog_FfeExposure {
uint64_t timestamp_ms;
ddog_CharSlice flag_key;
Expand Down Expand Up @@ -1301,6 +1377,9 @@ typedef struct ddog_Slice_FfeExposure {
*/
uintptr_t len;
} ddog_Slice_FfeExposure;
/**
* C representation of a Feature Flags evaluation event.
*/
typedef struct ddog_FfeFlagEvaluation {
int64_t timestamp_ms;
ddog_CharSlice flag_key;
Expand Down Expand Up @@ -1339,6 +1418,9 @@ typedef struct ddog_Slice_FfeFlagEvaluation {
*/
uintptr_t len;
} ddog_Slice_FfeFlagEvaluation;
/**
* C representation of a Feature Flags evaluation metric.
*/
typedef struct ddog_FfeEvaluationMetric {
ddog_CharSlice flag_key;
ddog_CharSlice variant;
Expand Down
Loading
Loading