azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

App Configuration provider: add telemetry schme

Open ivywei0125 opened this issue 1 year ago • 1 comments

Description

Telemetry schema

{
    "telemetry": {
        "enabled": true,
        "metadata": {
            "key": "value",
            "key2": "value2"
        }
    }
}

Metadata is represented by a dictionary of string keys and string values. When telemetry is enabled, need to add FeatureFlagId, FeatureFlagReference, and ETag. These 3 properties are agreed upon with Split.io used to trace feature flag.

  • FeatureFlagId – an ID for each feature flag based on the key and label that is then hashed with SHA 256 and encoded to base64 URL.
    b64_url(SHA256(utf8_bytes(“${featureFlag.key}\n${featureFlag.label}”))).Replace('+', '-').Replace('/', '_').TrimEnd('=')
  • FeatureFlagReference – a URL used to trace back from a feature flag to a specific app configuration store it came from. ${endpoint}kv/${featureFlag.key}?label=${featureFlag.label}
  • ETag – The ETag returned as part of the configuration setting for a feature flag.

ivywei0125 avatar Feb 25 '24 03:02 ivywei0125

API change check

API changes are not detected in this pull request.

azure-sdk avatar Feb 25 '24 03:02 azure-sdk