microsoft / microsoft/onnxruntime

[Feature Request] Improve Telemetry Disablement

Open
#25,573 2 comments 5 reactions 0 assignees View on GitHub
feature request
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

### Describe the feature request

Currently in the Onnx runtime API there's a function to disable telemetry (`DisableTelemetryEvents`), and while this works for all calls made after, the function requires an `OrtEnv` to be passed in first, meaning that the CreateEnv call is not guarded by this. From what I can tell this means that no matter what some telemetry is always sent even if it is desired to be disabled when an Env is created via the following chain of calls:

`CreateEnv` -> `OrtEnv::GetInstance` -> `onnxruntime::Enviornment::Create` -> `onnxruntime::Enviornment::Initialize` -> `env.GetTelemetryProvider().LogProcessInfo();`

Obviously for some this is undesirable and it'd be better if the flag to disable telemetry could be passed as part of creating the Enviornment. Correct me if I am wrong in my understanding though as this is just based on browsing through the code.

### Describe scenario use case

The use case is self-explanatory, simply allowing a user to actually disable telemetry when requested as there's no mention that it's impossible to fully turn off in the documentation so this is the expectation.

Contributor guide

Open the contributing guide

Research direction

Trace the CreateEnv -> OrtEnv::GetInstance -> onnxruntime::Environment::Create -> Environment::Initialize chain and inspect DisableTelemetryEvents and LogProcessInfo. Determine how environment creation can accept telemetry-disablement before initialization, then update the relevant API and tests so creating an environment with the option emits no telemetry.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, machine-learning, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.