[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
robertomonteromiguel
left a comment
There was a problem hiding this comment.
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. |
shurivich
left a comment
There was a problem hiding this comment.
We have a method of enriching all probes with required information.
system-tests/tests/debugger/utils.py
Line 76 in 02c78ef
I suggest to add the code:
probe["version"] = 0
after the line
system-tests/tests/debugger/utils.py
Line 92 in 02c78ef
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.
|
Sorry, the script that computes which scenario to run failed, so this PR hasn't be tested 😢 I've reverted it, and fixed the script. To correct this PR, you must very probably update the hash, as the content you've sent has changed, I can help you to do so. |

Motivation
All probes sent via Remote Config should have a root
versionproperty. 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: undefinedin the object before it was serialized to JSON, which would completely remove theversionproperty from the JSON output.Maybe they other tracers fall back to
0if there's noversionproperty in the probe config?Changes
Hardcode all mocked probe configs to contain
version: 0.Workflow
codeownersfile 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-imagelabel is present