How to use OpenTelemetry and Logging to monitor Foyle.
Configure Honeycomb
To configure Foyle to use Honeycomb as a backend you just need to set the telemetry.honeycomb.apiKeyFile
configuration option to the path of a file containing your Honeycomb API key.
foyle config set telemetry.honeycomb.apiKeyFile = /path/to/apikey
Google Cloud Logging
If you are running Foyle locally but want to stream logs to Cloud Logging you can edit the logging stanza in your
config as follows:
Given the traceId, you can fetch the request and response from the LOGS
curl -s -o /tmp/response.json -X POST http://localhost:8877/api/foyle.logs.LogsService/GetLLMLogs -H "Content-Type: application/json" -d "{\"traceId\": \"${TRACEID}\"}"CODE="$?"if[$CODE -ne 0];thenecho"Error occurred while fetching LLM logs"exit$CODEfi
You can view an HTML rendering of the prompt and response
If you disable interactive mode for the cell then vscode will render the HTML respnse inline
Note There appears to be a bug right now in the HTML rendering causing a bunch of newlines to be introduced relative to what’s in the actual markdown in the JSON request
It is being developed to support using Honeycomb with Foyle.
TAG=$(curl -s https://api.github.com/repos/jlewi/hccli/releases/latest | jq -r '.tag_name')# Remove the leading v because its not part of the binary nameTAGNOV=${TAG#v}OS=$(uname -s | tr '[:upper:]''[:lower:]')ARCH=$(uname -m)echo latest tag is $TAGecho OS is $OSecho Arch is $ARCHLINK=https://github.com/jlewi/hccli/releases/download/${TAG}/hccli_${TAGNOV}_${OS}_${ARCH}echo Downloading $LINKwget $LINK -O /tmp/hccli
Move the hccli binary to a directory in your PATH.