-
Notifications
You must be signed in to change notification settings - Fork 494
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
Client Telemetry: Adds Client Config API support to control the feature #3816
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sourabh1007
requested review from
kirankumarkolli,
ealsur,
FabianMeiswinkel,
kirillg and
sboshra
as code owners
April 18, 2023 10:43
sourabh1007
force-pushed
the
user/sourabh/clientconfigAPIIntegration
branch
2 times, most recently
from
April 27, 2023 18:57
99986f5
to
570a79a
Compare
sourabh1007
force-pushed
the
user/sourabh/clientconfigAPIIntegration
branch
from
May 8, 2023 13:43
570a79a
to
d8589f3
Compare
sourabh1007
force-pushed
the
user/sourabh/clientconfigAPIIntegration
branch
8 times, most recently
from
May 11, 2023 18:00
fa8bc3a
to
31cd5b0
Compare
sourabh1007
force-pushed
the
user/sourabh/clientconfigAPIIntegration
branch
from
May 16, 2023 19:05
31cd5b0
to
28d5218
Compare
sourabh1007
force-pushed
the
user/sourabh/clientconfigAPIIntegration
branch
from
May 18, 2023 15:11
28d5218
to
0dc371c
Compare
ealsur
reviewed
May 18, 2023
Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs
Outdated
Show resolved
Hide resolved
ealsur
reviewed
May 18, 2023
ealsur
reviewed
May 18, 2023
ealsur
requested changes
May 18, 2023
sourabh1007
force-pushed
the
user/sourabh/clientconfigAPIIntegration
branch
from
August 7, 2023 01:10
1c92a2f
to
0b8c275
Compare
Summary of offline sync-up: Functional:
C# model:
GoodToHave:
Option1: |
sourabh1007
force-pushed
the
user/sourabh/clientconfigAPIIntegration
branch
from
August 8, 2023 14:05
a48b214
to
241db02
Compare
sourabh1007
added
Do Not Review
Marks a PR in "work in progress" state.
and removed
auto-merge
Enables automation to merge PRs
labels
Aug 14, 2023
As @kirankumarkolli suggested splitting this PR into small PRs:
|
CLosing this PR as it is covered as part of attached PRs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Background
Till now, Client Telemetry feature was controlled by environment variable. It means customer has to set a particular environment variable in order to enable client telemetry on SDK. but ideally, it should be controlled by portal. In portal, there will be a switch to enable/disable client telemetry. And SDK will get this information using a gateway API (similar to database account properties) and act accordingly.
As part of this PR, Gateway API is integrated, and environment variable config is removed. SDK will call gateway API in every 10 minutes to refresh this information.
What is included in this PR?
a) Instance level: by calling client builder function or setting
CosmosClientOptions.EnableClientTelemetry
tofalse
.b) Machine level : by setting environment variableAs per discussion with team, it is not required we can recommend customer to switch off client telemetry completely.COSMOS.CLIENT_TELEMETRY_ENABLED
tofalse
.Public API
Not part of this PR
Design Summary
During initialization of client, starting a Task in
DoumentClient
which check for Account Client Config and initialize client telemetry job if it is enabled(ref.TelemetryToServiceHelper
). This job will dynamically update theclientTelemetryInstance
if client telemetry job is running.Test Coverage
ClientTelemetryTest
Emulator test, to mock ClientConfig API and always return enabled state of client telemetry2. Added a Test inGatewayTests
to validate ClientConfig API with gateway end point3. Added logic to access ClientConfig API using AAD inCosmosAadTests.cs
ClientTelemetryConfigurationTest.cs
Type of change
Closing issues
To automatically close an issue: closes #3427