In the previous step, you logged a static message that said
"This is a test". A more realistic use case is logging the value of a
message flow variable in an
API proxy flow.
In this step, you'll log your client IP address, which is a property of the client
flow variable.
To log your client IP address with your extension:
In the API proxy editor, select the Develop tab.
Click your extension logging policy and change the value of message:
FROM:
"message": "This is a test"
TO:
"message": "Client IP: {client.ip}"
Save the proxy.
Select the Trace tab.
Click Start Trace Session, and click Send.
Open the GCP console and go to Logging.
Select the following:
Global
example-log
Last Hour
You should see a log entry with your client IP address.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-11 UTC."],[],[]]