From 56d13cfadc1b1a7245dbe31f584edb1e2984c1ee Mon Sep 17 00:00:00 2001
From: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Date: Tue, 16 Nov 2021 12:36:53 -0500
Subject: [PATCH] Clarify generation of EffectiveConfig hash (#30)
Resolves https://github.com/open-telemetry/opamp-spec/issues/19
This clarifies that the hash of the effective config is calculated by the Agent.
---
README.md | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index eebff18..9ef6b8f 100644
--- a/README.md
+++ b/README.md
@@ -582,11 +582,14 @@ message EffectiveConfig {
hash
-
-The hash of the effective config. After establishing the OpAMP connection if the
-effective config did not change since it was last reported during the previous
-connection sessions the Agent is recommended to include only the hash and omit
-the config_map field to save bandwidth.
+The hash of the effective config. The hash is calculated by the Agent from the
+content of the effective config (from the names and content of all items in the
+config_map field).
+
+After establishing the OpAMP connection if the effective config did not change
+since it was last reported during the previous connection sessions the Agent is
+recommended to include only the hash field and omit the config_map field to save
+bandwidth.
The Server SHOULD compare this hash with the last hash of effective config it
received from the Agent and if the hashes are different the Server SHOULD ask