Azure / Azure/data-api-builder
[Bug]: add-telemetry overwrites Previous Telemetry Settings
- 主要言語
- C#
- スター
- 1.5k
- フォーク
- 370
- 平均マージ
- 3日 22時間
- マージ済み PR(30日)
- 9
説明
## Expected
Second call should only modify OTEL settings, preserving App Insights settings.
### North star
```
dab configure --runtime.telemetry.application-insights.enabled
dab configure --runtime.telemetry.application-insights.connection-string
dab configure --runtime.telemetry.open-telemetry.enabled
dab configure --runtime.telemetry.open-telemetry.endpoint
dab configure --runtime.telemetry.open-telemetry.headers
dab configure --runtime.telemetry.open-telemetry.exporter-protocol
dab configure --runtime.telemetry.open-telemetry.service-name
```
So that we can **deprecate** `add-telemetry`
## Actual
Second call resets app-insights enabled to false and removes connection-string.
## Workaround
Configure all telemetry providers in a single add-telemetry call.
## Details
Running dab add-telemetry --app-insights-enabled true then dab add-telemetry --otel-enabled true results in app-insights being reset to false and its connection-string being removed. Each call replaces the entire telemetry block rather than merging.
```bash
dab init --database-type mssql --connection-string "test" --config bug6.json
dab add-telemetry --app-insights-enabled true --app-insights-conn-string "InstrumentationKey=test123" --config bug6.json
# Config: application-insights.enabled = true, connection-string = "InstrumentationKey=test123" ✓
dab add-telemetry --otel-enabled true --otel-endpoint "http://localhost:4317" --config bug6.json
# Config: application-insights.enabled = false ✗ (overwritten)
# Config: application-insights.connection-string removed ✗
# Config: open-telemetry correctly set ✓
コントリビューションガイド
調査の方向性
add-telemetry CLI エントリポイントから始め、bug6.json に対して 2 つのコマンドを再現します。2 回目の呼び出しでテレメトリブロックがどのように書き込まれるかを調べ、既存の Application Insights 設定が維持される一方で OpenTelemetry 設定が更新されることを示す回帰テストを追加します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- azure, csharp
- 領域
- cli, observability-sre
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100