-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Debugger] Ensure all probes have a version property #3581
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
9a29d68
to
9f8b315
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the system-tests core point of view it is correct. But you would need the approval of other teams.
This PR seems reasonable since it only adds a field to the input (which I believe Ruby implementation will ignore), but I will test locally before adding my checkmark. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a method of enriching all probes with required information.
system-tests/tests/debugger/utils.py
Line 76 in 02c78ef
def _enrich_probes(probes): |
I suggest to add the code:
probe["version"] = 0
after the line
system-tests/tests/debugger/utils.py
Line 92 in 02c78ef
probe["language"] = language |
instead of modifying all json probe files.
What's the reason we don't want to update the json at the source? |
Single responsibility - updates are handled in one place, ensuring clarity. But maybe it's just a matter of code taste, so it's up to you to decide. |
@shurivich I think it makes a lot of sense to have a way to dynamically update the JSON to suite the language being instrumented and other non-fixed properties - exactly like you've done in However, the So if you don't mind, I'll just leave it as is - at least for now. I think that makes it easier to understand the schema when just viewing the JSON file. Anyways, we can always refactor it if we want to make to the probe version dynamic |
This reverts commit b35b255.
Motivation
All probes sent via Remote Config should have a root
version
property. For some reason, one was not present in our mocked probe configs located intests/debugger/probes
. I'm not sure why this hasn't resulted in system test errors previously since the diagnostics schema expects that a version is reported. However, without this, at least the Node.js tracer, would setversion: undefined
in the object before it was serialized to JSON, which would completely remove theversion
property from the JSON output.Maybe they other tracers fall back to
0
if there's noversion
property in the probe config?Changes
Hardcode all mocked probe configs to contain
version: 0
.Workflow
codeowners
file quickly.🚀 Once your PR is reviewed, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
[<language>]
, double-check that only<language>
is impacted by the changebuild-XXX-image
label is present