-
Notifications
You must be signed in to change notification settings - Fork 1k
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
DOTNET_CLI_TELEMETRY_OPTOUT through csproj #38646
Comments
This is not feasible IMO - not all telemetry-triggering operations even interact with a project file. And in the cases where we are interacting with a project file the SDK would have to evaluate the project entirely separately from MSBuild, which would cause many perf implications. We have talked off and on about a .NET CLI config system a-la git config, this is where opt-in should be defined IMO to be cross-cutting. With such a system users could run a single command like |
Per baronfel's comment, this isn't really possible. Since there was no action for the month since then, I'm closing this. Let us know if you want the git config option to opt out of telemetry 🙂 |
@Forgind, Not sure dotnet config is what I am looking for since I do not want to change the system, just my session hence the request for csproj that is always the common ground. We already have the system option through the env variable. |
Part of baronfel's point is that we don't read the csproj early enough to properly suppress telemetry, and if we send back a bunch of telemetry then find out we shouldn't have done that, it's too late. I'm a bit unclear on to what extent you want this to persist. Environment variables are system-wide, but they don't persist across sessions, so the next user won't know that you'd set the environment variable. csproj changes do persist across users as long as they use the same csproj. I don't believe dotnet config exists yet, so to some extent, how it works still needs design. I'm only speaking for myself here, not the team, but one option I could feasibly imagine would be to write arbitrary values into a global.json and read them as soon as the CLI starts up, so: I imagine that when you move your csproj file, you'd move everything else with it, including this modified global.json file, so it would obviate the need to separately set the environment before building, but it would also fit better with how the CLI currently does things. What do you think? |
Global.json might work. |
@JensNordenbro, that might actually make things easier. If you're using Process.Start, I assume you have a ProcessStartInfo ahead of time? That should have an EnvironmentVariables property that you can use to modify its environment before you launch it. That would probably be the easiest solution for your case. |
@Forgind, I will try that. |
I roughly know how to access telemetry from our end, but I have no idea from your end. @baronfel, is there a way? |
The CLI/SDK doesn't provide any external user-discoverable way to tell what the configuration is - the only externally-visible knob here is the |
If it is https/tcp telemetry to a fix dns then I can scan the network for
signs of telemetry.
Den mån 24 juni 2024 19:40Chet Husk ***@***.***> skrev:
… The CLI/SDK doesn't provide any external user-discoverable way to tell
what the configuration is - the only externally-visible knob here is the
DOTNET_CLI_TELEMETRY_OPTOUT environment variable's value
(true/1/yes/false/0/no), but that may not always be set. If it is not set
by a user, then if the SDK is an MS-authored SDK then telemetry is sent. If
the SDK is an OSS-authored SDK then telemetry is *not* sent.
—
Reply to this email directly, view it on GitHub
<#38646 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJCHFMGZPA6S5ICFT6O7EDZJBKZPAVCNFSM6AAAAABDBCHTZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBXGA4DMMZYGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
What of it is an sdk from the zip bundle?
Den tors 27 juni 2024 08:48Jens Nordenbro ***@***.***> skrev:
… If it is https/tcp telemetry to a fix dns then I can scan the network for
signs of telemetry.
Den mån 24 juni 2024 19:40Chet Husk ***@***.***> skrev:
> The CLI/SDK doesn't provide any external user-discoverable way to tell
> what the configuration is - the only externally-visible knob here is the
> DOTNET_CLI_TELEMETRY_OPTOUT environment variable's value
> (true/1/yes/false/0/no), but that may not always be set. If it is not set
> by a user, then if the SDK is an MS-authored SDK then telemetry is sent. If
> the SDK is an OSS-authored SDK then telemetry is *not* sent.
>
> —
> Reply to this email directly, view it on GitHub
> <#38646 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACJCHFMGZPA6S5ICFT6O7EDZJBKZPAVCNFSM6AAAAABDBCHTZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBXGA4DMMZYGI>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Same behavior, depending on if the zip is an MS authored SDK zip or a Source-Build authored zip. Anything you download off of the MS .NET download page is going to have telemetry enabled by default. |
How about detecting telemetry requests @baronfel ? |
I'm not quite sure what you mean, can you elaborate? |
Using what protocol and port is the telemetry sent on? Knowing this I can ensure my app has disable telemetry on all dotnet cli invocations |
It should be possible to disable telemetry inside a csproj.
Many developers are moving their projects through containers, VMs, cloud machines, local machines, stationaries and laptops and it is just too easy to forget setting up the environment.
The text was updated successfully, but these errors were encountered: