Use stable config for RUM snippet creation#331
Draft
pawelchcki wants to merge 17 commits intomasterfrom
Draft
Conversation
- Auto path: try_build_snippet_from_env now uses snippet_create_from_stable_config to read from application_monitoring.yaml instead of building JSON from DD_RUM_* env vars - Directive path: on_datadog_rum_config seeds from stable config via stable_config_get_entries, with directive block values overriding - Trim env var forwarding to only DD_RUM_ENABLED and DD_RUM_APPLICATION_ID - Pin inject-browser-sdk to 587b071 (includes stable_config_get_entries FFI)
A transitive dependency (clap_builder 4.6.0, via libdd-library-config) now requires the Rust 2024 edition which needs Rust 1.85+.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #331 +/- ##
=======================================
Coverage 68.85% 68.85%
=======================================
Files 56 56
Lines 7471 7471
Branches 1058 1058
=======================================
Hits 5144 5144
Misses 1820 1820
Partials 507 507 🚀 New features to boost your workflow:
|
The :latest tag was cached by nydus snapshotter on CI runners. Use an explicit tag to force pulling the updated image with Rust 1.85.0.
aws-lc-sys (transitive dep via libdd-library-config -> rustls) compiles C code during its build script. Without sysroot flags, the linker cannot find crtbeginS.o in the musl cross-compilation environment.
Rust_CARGO_TARGET is empty at the point corrosion_set_env_vars runs. Use hardcoded x86_64/aarch64 target names instead — only one will match the actual cargo build target, the other is harmlessly ignored.
aws-lc-sys build script compile+links test binaries via clang. Without these flags, clang invokes system GNU ld which can't find crtbeginS.o and libgcc in the musl sysroot. Using lld and compiler-rt matches the rest of the toolchain setup.
test_env_only_config and test_partial_env_config now write application_monitoring.yaml into the container instead of setting DD_RUM_* env vars, matching the new stable config integration.
test_env_remote_configuration_id, test_env_disabled_overrides_env_config, and test_env_disabled_location_override now use application_monitoring.yaml instead of DD_RUM_* env vars. DD_RUM_ENABLED still uses env var since it controls the enable/disable flag, not the config source.
…hared_library_for_env # Conflicts: # .gitlab/build-and-test-fast.yml # .gitlab/common.yml # .gitlab/prepare-oci-package.sh # .gitlab/ssi-package.yml
Adds DD_RUM_REMOTE_CONFIGURATION_ID support in configuration_from_getter so remoteConfigurationId appears in snippets created via stable config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
try_build_snippet_from_envnow usessnippet_create_from_stable_configto read RUM config from Datadog Agent'sapplication_monitoring.yamlfiles instead of building JSON fromDD_RUM_*env varson_datadog_rum_configseedsrum_config_mapfrom stable config viastable_config_get_entries, with directive block values overridingDD_RUM_ENABLEDandDD_RUM_APPLICATION_ID(for telemetry tags)add-common-way-to-parse-env-variablesbranch):DD_RUM_SITE,DD_RUM_SERVICE,DD_RUM_ENVIRONMENTtake priority overDD_SITE,DD_SERVICE,DD_ENVstable_config_get_entries/stable_config_entries_cleanupC FFI for reading raw config entriesTest plan
cargo testpasses in inject-browser-sdk (33 lib + 4 FFI tests)-DNGINX_DATADOG_RUM_ENABLED=ON -DINJECT_BROWSER_SDK_NO_DEFAULT_FEATURES=OFFsnippet_create_from_stable_configandstable_config_get_entriesappear in generatedinjectbrowsersdk.happlication_monitoring.yamlwith DD_RUM_SITE/DD_RUM_APPLICATION_ID and verify injection worksdatadog_rum_configdirective with overrides and verify it seeds from stable config