After finishing census-instrumentation/opencensus-php#191, please use that util to get the monitored resource for Stackdriver Trace exporter, and add the resource labels to the uploaded Spans as Attribute. The format of attribute key is g.co/r/<resource_type>/<label>, for example g.co/r/aws_ec2_instance/aws_account.
Counterpart in Java: census-instrumentation/opencensus-java#1243.