Skip to content

feat(stable-configuration): Add first system test#3982

Merged
BaptisteFoy merged 2 commits intomainfrom
baptiste.foy/APM/stable-configuration
Feb 5, 2025
Merged

feat(stable-configuration): Add first system test#3982
BaptisteFoy merged 2 commits intomainfrom
baptiste.foy/APM/stable-configuration

Conversation

@BaptisteFoy
Copy link
Copy Markdown
Contributor

@BaptisteFoy BaptisteFoy commented Feb 4, 2025

Motivation

Having system tests work for stable configuration

Changes

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner. We're working on refining the codeowners file quickly.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • If PR title starts with [<language>], double-check that only <language> is impacted by the change
  • No system-tests internal is modified. Otherwise, I have the approval from R&P team
  • CI is green, or failing jobs are not related to this change (and you are 100% sure about this statement)
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added (or removed)?

@BaptisteFoy BaptisteFoy force-pushed the baptiste.foy/APM/stable-configuration branch from 46a7ccb to 49b36fe Compare February 4, 2025 16:34
@BaptisteFoy BaptisteFoy force-pushed the baptiste.foy/APM/stable-configuration branch from 49b36fe to 6ddfb04 Compare February 4, 2025 16:38
Copy link
Copy Markdown
Contributor

@mabdinur mabdinur left a comment

Choose a reason for hiding this comment

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

This change looks good.

We will also need to update the manifest files for each library (java, dotnet, nodejs, ...) to document minimum supported versions.

If a library does not yet support stable configurations we need to mark Test_Stable_Config_Default as a missing_feature (example)

Copy link
Copy Markdown
Collaborator

@cbeauchesne cbeauchesne left a comment

Choose a reason for hiding this comment

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

CI is failing

@BaptisteFoy BaptisteFoy requested review from a team as code owners February 5, 2025 09:21
@BaptisteFoy BaptisteFoy requested review from duncanista, jandro996, juanjux, sezen-datadog and ygree and removed request for a team February 5, 2025 09:21
@BaptisteFoy BaptisteFoy force-pushed the baptiste.foy/APM/stable-configuration branch from 1648849 to e49e94a Compare February 5, 2025 09:23
@BaptisteFoy BaptisteFoy force-pushed the baptiste.foy/APM/stable-configuration branch from e49e94a to ec9f40a Compare February 5, 2025 09:26
@BaptisteFoy BaptisteFoy marked this pull request as ready for review February 5, 2025 13:25
@BaptisteFoy BaptisteFoy marked this pull request as draft February 5, 2025 13:33
@BaptisteFoy BaptisteFoy marked this pull request as ready for review February 5, 2025 13:40
Copy link
Copy Markdown
Member

@robertpi robertpi left a comment

Choose a reason for hiding this comment

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

As requested, I confirm the dotnet parts are good :)

@BaptisteFoy BaptisteFoy merged commit 1faea80 into main Feb 5, 2025
@BaptisteFoy BaptisteFoy deleted the baptiste.foy/APM/stable-configuration branch February 5, 2025 15:20
mabdinur pushed a commit to DataDog/dd-trace-py that referenced this pull request Feb 13, 2025
…file (#12260)

## Description of changes
Most changes were taken from
#11839

- Bumps `libdatadog` to v16.0.2
- Starts using the library_config component of `libdatadog` that allows
reading configuration from a file **with a higher precedence than
environment variables**

### Supported config entries
As of libdatadog v16.0.2:
- DD_APM_TRACING_ENABLED
- DD_RUNTIME_METRICS_ENABLED
- DD_LOGS_INJECTION
- DD_PROFILING_ENABLED
- DD_DATA_STREAMS_ENABLED
- DD_APPSEC_ENABLED
- DD_IAST_ENABLED
- DD_DYNAMIC_INSTRUMENTATION_ENABLED
- DD_DATA_JOBS_ENABLED
- DD_APPSEC_SCA_ENABLED
- DD_TRACE_DEBUG
- DD_SERVICE
- DD_ENV
- DD_VERSION


## Testing strategy
Added a unit test.

To test this PR, you can:
1. Create a Linux VM
2. Start this tracer version & ensure everything works well
(non-regression)
3. Create a file at the following path:
`/etc/datadog-agent/application_monitoring.yaml`
4. Write the following content in the file:
```yaml
rules:
  - selectors:
      - origin: language
        matches:
          - python
        operator: equals
    configuration:
      DD_TRACE_DEBUG: true
```
5. Start this tracer version
6. Verify that debug logs are properly enabled

## Additional concerns
Relevant system test: DataDog/system-tests#3982

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
gnufede pushed a commit to DataDog/dd-trace-py that referenced this pull request Feb 19, 2025
…file (#12260)

## Description of changes
Most changes were taken from
#11839

- Bumps `libdatadog` to v16.0.2
- Starts using the library_config component of `libdatadog` that allows
reading configuration from a file **with a higher precedence than
environment variables**

### Supported config entries
As of libdatadog v16.0.2:
- DD_APM_TRACING_ENABLED
- DD_RUNTIME_METRICS_ENABLED
- DD_LOGS_INJECTION
- DD_PROFILING_ENABLED
- DD_DATA_STREAMS_ENABLED
- DD_APPSEC_ENABLED
- DD_IAST_ENABLED
- DD_DYNAMIC_INSTRUMENTATION_ENABLED
- DD_DATA_JOBS_ENABLED
- DD_APPSEC_SCA_ENABLED
- DD_TRACE_DEBUG
- DD_SERVICE
- DD_ENV
- DD_VERSION


## Testing strategy
Added a unit test.

To test this PR, you can:
1. Create a Linux VM
2. Start this tracer version & ensure everything works well
(non-regression)
3. Create a file at the following path:
`/etc/datadog-agent/application_monitoring.yaml`
4. Write the following content in the file:
```yaml
rules:
  - selectors:
      - origin: language
        matches:
          - python
        operator: equals
    configuration:
      DD_TRACE_DEBUG: true
```
5. Start this tracer version
6. Verify that debug logs are properly enabled

## Additional concerns
Relevant system test: DataDog/system-tests#3982

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
RamyElkest pushed a commit to DataDog/dd-trace-py that referenced this pull request Feb 20, 2025
…file (#12260)

## Description of changes
Most changes were taken from
#11839

- Bumps `libdatadog` to v16.0.2
- Starts using the library_config component of `libdatadog` that allows
reading configuration from a file **with a higher precedence than
environment variables**

### Supported config entries
As of libdatadog v16.0.2:
- DD_APM_TRACING_ENABLED
- DD_RUNTIME_METRICS_ENABLED
- DD_LOGS_INJECTION
- DD_PROFILING_ENABLED
- DD_DATA_STREAMS_ENABLED
- DD_APPSEC_ENABLED
- DD_IAST_ENABLED
- DD_DYNAMIC_INSTRUMENTATION_ENABLED
- DD_DATA_JOBS_ENABLED
- DD_APPSEC_SCA_ENABLED
- DD_TRACE_DEBUG
- DD_SERVICE
- DD_ENV
- DD_VERSION


## Testing strategy
Added a unit test.

To test this PR, you can:
1. Create a Linux VM
2. Start this tracer version & ensure everything works well
(non-regression)
3. Create a file at the following path:
`/etc/datadog-agent/application_monitoring.yaml`
4. Write the following content in the file:
```yaml
rules:
  - selectors:
      - origin: language
        matches:
          - python
        operator: equals
    configuration:
      DD_TRACE_DEBUG: true
```
5. Start this tracer version
6. Verify that debug logs are properly enabled

## Additional concerns
Relevant system test: DataDog/system-tests#3982

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants