Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Test_Config_LogInjection_128Bit_TradeId tests #3875

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mtoffl01
Copy link
Contributor

@mtoffl01 mtoffl01 commented Jan 22, 2025

Motivation

128bit trace ID logging will be enabled by default in dd-trace-go as of this PR: DataDog/dd-trace-go#3086

Changes

  • Enables Test_Config_LogInjection_128Bit_TradeId_Default and Test_Config_LogInjection_128Bit_TradeId_Disabled tests for dd-trace-go v1.72.0-dev+
  • Modifies test logic for parsing the resulting log message, since the previous regex did not match the pattern for go (Go prints trace id and span id as separate entities, dd.trace_id and dd.span_id, instead of sub-entities of a great dd field e.g. "dd": {"trace_id": val, "span_id": val}

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)?

@cbeauchesne cbeauchesne changed the title [go] Enable Test_Config_LogInjection_128Bit_TradeId tests [golang] Enable Test_Config_LogInjection_128Bit_TradeId tests Jan 23, 2025
Copy link
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.

As the test logic is modified, I removed the prefix in the Pr title

@cbeauchesne cbeauchesne changed the title [golang] Enable Test_Config_LogInjection_128Bit_TradeId tests Enable Test_Config_LogInjection_128Bit_TradeId tests Jan 23, 2025
@mtoffl01 mtoffl01 requested a review from khanayan123 January 23, 2025 15:15
@mtoffl01
Copy link
Contributor Author

mtoffl01 commented Jan 23, 2025

@cbeauchesne ,
This PR is failing the linter, but I had to change the test condition to check for 'message' in addition to "message" because it was failing otherwise; the json it's trying to match against looked like this: {'message': "key":"value",...}. I was surprised that "message" was not a sufficient match, but this was the only way I got it to work. What are your thoughts?

@cbeauchesne
Copy link
Collaborator

'message' and "message" are exactly the same in python, and the lint rules applied here requires to use the second.

I'm not really sure to understand what you want to do, could you add a meeting? we'll go trough this with zoom, it'll be easier.

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.

2 participants