You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: gcp_metadata_config.go
    path of file: ./repos/agones/vendor/contrib.go.opencensus.io/exporter/stackdriver/monitoredresource
    
    the code of the file until where you have to start completion: // Copyright 2018, OpenCensus Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package monitoredresource

import (
	"log"
	"os"
	"strings"

	"cloud.google.com/go/compute/metadata"
)

// gcpMetadata represents meta
    
func retrieveGCPMetadata() *gcpMetadata {
	gcpMetadata := gcpMetadata{}
	var err error
	gcpMetadata.instanceID, err = metadata.InstanceID()
	if err != nil {
		// Not a GCP environment
		return &gcpMetadata
	}

	gcpMetadata.projectID, err = metadata.ProjectID()
	logError(err)

	gcpMetadata.zone, err = metadata.Zone()
	logError(err)

	clusterName, err := metadata.InstanceAttributeValue("cluster-name")
	logError(err)
	gcpMetadata.clusterName = strings.TrimSpace(clusterName)

	// Following attributes are derived from environment variables. They are configured
	// via yaml file. For details refer to:
	// https://cloud.google.com/kubernetes-engine/docs/tutorials/custom-metrics-autoscaling#exporting_metrics_from_the_application
	gcpMetadata.namespaceID = os.Getenv("NAMESPACE")
	gcpMetadata.containerName = os.Getenv("CONTAINER_NAME")
	gcpMetadata.podID = os.Getenv("HOSTNAME")

	return &gcpMetadata
}