From 4e31da4e34120b5a52699951edde2296273535b4 Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Sat, 11 May 2024 11:11:12 +0300 Subject: [PATCH] docs: fixes to README --- GUIDELINES.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/GUIDELINES.md b/GUIDELINES.md index 17bd401328..a2d7c8340b 100644 --- a/GUIDELINES.md +++ b/GUIDELINES.md @@ -252,11 +252,19 @@ In this case, the instrumentation patches a nodejs internal module, which is not One instrumentation package can potentially instrument multiple modules of different packages and version ranges. This makes sense if they are related, for example: `pg` and `pg-pool`, `aws-sdk` dozens of client packages etc. In this case, the instrumentation should specify the supported versions range for each module, and the README should list them. -### Range Syntax +#### Different Patch Logic -Instrumentations should prefer to specify the supported versions of the instrumented package as `>=x.y.z =x.y.z =4.0.0` and should be revisited when new versions are released. +For cases where the range is not capped by an upper limit, the README should specify a version with an open upper limit `>=4.0.0`. This should be revisited when new versions are released. ### Add New Supported Versions -When a new major version of the instrumented package is released, renovate bot will open a PR in contrib which is an easy was to become aware of it. The instrumentation maintainer should review the new version and decide if it should be added to the supported versions list. Then a PR can add it to the list and it will be published in the next release. +When a new major version of the instrumented package is released, renovate bot will open a PR in contrib which is an easy was to become aware of it. The instrumentation maintainer should review the new version and check compatibility with existing code. It can then be added to the supported versions list to be released in the next version of the instrumentation. Checklist for adding a new version to the supported versions list: -- Review which functions are patched by the instrumentation and if they were changed in the new version. -- Check for breaking changes in the new version that could affect the instrumentation. -- Test the instrumentation with the new version to ensure it works as expected. -- Update the supported versions list in the instrumentation code, perhaps with different patches and additional `InstrumentationNodeModuleDefinition` that target the new version. -- Update the README file with the new supported version range. -- For instrumentations that uses test-all-verions `.tav.yaml`, add the new version to the list of versions to test. +[ ] Review which functions are patched by the instrumentation and if they were changed in the new version that need support in code. +[ ] Check for breaking changes in the new version that could affect the instrumentation. +[ ] Test the instrumentation with the new version to ensure it works as expected. +[ ] Update the supported versions list in the instrumentation code, perhaps with different patches and additional `InstrumentationNodeModuleDefinition` that target the new version. +[ ] Update the README file to reflect the support for new versions. +[ ] For instrumentations that uses test-all-verions `.tav.yaml`, add the new version to the list of versions to test.