Update RESTler version to 9.1.2 (#739)
This commit is contained in:
Родитель
a4844a34f1
Коммит
038bc62208
|
@ -4,7 +4,7 @@ variables:
|
||||||
- name: version.minor
|
- name: version.minor
|
||||||
value: 1
|
value: 1
|
||||||
- name: devRevision
|
- name: devRevision
|
||||||
value: 1
|
value: 2
|
||||||
- name: buildPlatform
|
- name: buildPlatform
|
||||||
value: 'Any CPU'
|
value: 'Any CPU'
|
||||||
- name: buildConfiguration
|
- name: buildConfiguration
|
||||||
|
|
|
@ -14,7 +14,7 @@ open Microsoft.FSharpLu.Diagnostics.Process
|
||||||
open Restler.Telemetry
|
open Restler.Telemetry
|
||||||
|
|
||||||
[<Literal>]
|
[<Literal>]
|
||||||
let CurrentVersion = "9.1.1"
|
let CurrentVersion = "9.1.2"
|
||||||
let EngineErrorCode = -2
|
let EngineErrorCode = -2
|
||||||
|
|
||||||
let exitRestler status =
|
let exitRestler status =
|
||||||
|
@ -832,29 +832,29 @@ let main argv =
|
||||||
| None -> Restler.Telemetry.InstrumentationKey
|
| None -> Restler.Telemetry.InstrumentationKey
|
||||||
| Some key -> key
|
| Some key -> key
|
||||||
let machineId = Telemetry.getMachineId()
|
let machineId = Telemetry.getMachineId()
|
||||||
let environmentMetadata =
|
let environmentMetadata =
|
||||||
match getConfigValue Telemetry.AppInsightsAdditionalPropertiesSettingsKey with
|
match getConfigValue Telemetry.AppInsightsAdditionalPropertiesSettingsKey with
|
||||||
| None -> []
|
| None -> []
|
||||||
| Some str ->
|
| Some str ->
|
||||||
match Restler.Utilities.JsonSerialization.tryDeserialize<Telemetry.AdditionalTelemetryProperties> str with
|
match Restler.Utilities.JsonSerialization.tryDeserialize<Telemetry.AdditionalTelemetryProperties> str with
|
||||||
| Choice1Of2 p ->
|
| Choice1Of2 p ->
|
||||||
let envVarValues =
|
let envVarValues =
|
||||||
match p.envVars with
|
match p.envVars with
|
||||||
| None -> []
|
| None -> []
|
||||||
| Some envVars ->
|
| Some envVars ->
|
||||||
envVars
|
envVars
|
||||||
|> List.map (fun name -> name, Environment.GetEnvironmentVariable(name))
|
|> List.map (fun name -> name, Environment.GetEnvironmentVariable(name))
|
||||||
|> List.filter (fun (k,v) -> not (System.String.IsNullOrWhiteSpace v))
|
|> List.filter (fun (k,v) -> not (System.String.IsNullOrWhiteSpace v))
|
||||||
let propertyValues =
|
let propertyValues =
|
||||||
match p.properties with
|
match p.properties with
|
||||||
| None -> []
|
| None -> []
|
||||||
| Some properties ->
|
| Some properties ->
|
||||||
properties |> List.map (fun p -> p.key, p.value)
|
properties |> List.map (fun p -> p.key, p.value)
|
||||||
propertyValues @ envVarValues
|
propertyValues @ envVarValues
|
||||||
| Choice2Of2 error ->
|
| Choice2Of2 error ->
|
||||||
printfn "Error deserializing telemetry properties from runtime config: %s" error
|
printfn "Error deserializing telemetry properties from runtime config: %s" error
|
||||||
[]
|
[]
|
||||||
|
|
||||||
use telemetryClient = new TelemetryClient(machineId, instrumentationKey, environmentMetadata)
|
use telemetryClient = new TelemetryClient(machineId, instrumentationKey, environmentMetadata)
|
||||||
|
|
||||||
// Run task
|
// Run task
|
||||||
|
|
Загрузка…
Ссылка в новой задаче