Friday, 16 August 2019

Correlation in Application Insights

operation_parentId does not hold the value of the parent's operation_id. Instead it holds the value of the parent's request id. Confusing, eh?

operation_id has to be set in every logical service.

the request id has to be globally unique for every call, so you cannot set it to be a business key, such as an order reference.


Tuesday, 13 August 2019

Docker for Windows Desktop clock skew: Cosmos DB "The authorization token is not valid at the current time. Please create another token and retry"

I had a containerised application that connects to my Cosmos DB emulator running on my development environment.

Sometimes when I went back to the app after a couple of days it would fail. The Cosmos DB client would error with:

"The authorization token is not valid at the current time. Please create another token and retry"

Looking at the times in the message they were earlier than the current time so that token was out of date.

Attaching to the container with:

docker exec -it <container ID> /bin/bash

I could see that the container time was indeed wrong.

Solution 1

The solution was to restart Docker for Windows desktop.

Solution 2

The other solution is to go into Hyper-V Manager, select the Linux VM, select the settings, Integration Services and then disable and then re-enable Time Synchronisation.

Saturday, 15 June 2019

View HikVision cameras in VLC player

The camera feed is located at:

rtsp://<ipaddress>:554/ch1/main/av_stream

Create the following registry file and execute it:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\rtsp]
@="Real Time Streaming Protocol"

"URL Protocol"=""
[HKEY_CLASSES_ROOT\rtsp\shell]
[HKEY_CLASSES_ROOT\rtsp\shell\open]
[HKEY_CLASSES_ROOT\rtsp\shell\open\command]
@="\"C:\\Program Files\\VideoLan\\VLC\\vlc.exe\"%1"

Thursday, 13 June 2019

Android 9 breaks audio volume sync on JVC HA-S30BT bluetooth headphones

On Android 8 the media volume controls adjust the volume played back by the headset.
After applying the upgrade to Android 9 the controls seemed sporadic: sometimes the handset volume controls would adjust the headphones, sometimes it would not.

If you go into the Settings > Connections > Bluetooth > ... > Advanced the "Media Volume Sync" setting was greyed out and it said underneath "Not supported by the connected Bluetooth device".

This post seemed to fix it. By renaming the headphones to ABS-DO-ENABLE and disconnecting and reconnecting the handset volume then controlled the bluetooth headphone volume.

Once you've got it working, renaming it back seems to continue to work.