Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

CloudLogging Policy - Dynamic module

I have created a Sharedflow that contains a CloudLogging policy like described below.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging continueOnError="false" enabled="true" name="ML-CloudLogging">
  <DisplayName>ML-CloudLogging</DisplayName>
  <CloudLogging>
    <LogName>projects/{organization.name}/logs/apigee</LogName>
    <Message contentType="application/json">{
    "verb": "{request.verb}",
    "response_code": "{response.status.code}"
    }</Message>
    <Labels>
      <Label>
        <Key>Proxy</Key>
        <Value>{apiproxy.name}</Value>
      </Label>
      <Label>
        <Key>Environment</Key>
        <Value>{environment.name}</Value>
      </Label>
    </Labels>
  </CloudLogging>
</MessageLogging>
 
The logging works as expected but the value for the label is not extrapolated. 
phertzog_0-1681820705443.png
 

Is there a way to dynamicaly set the value of the label?

Regards

0 2 167
2 REPLIES 2