Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging: fix GKE resource autodetection #4079

Closed
freelerobot opened this issue May 10, 2021 · 1 comment · Fixed by #4092
Closed

logging: fix GKE resource autodetection #4079

freelerobot opened this issue May 10, 2021 · 1 comment · Fixed by #4092
Assignees
Labels
api: logging Issues related to the Cloud Logging API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@freelerobot
Copy link
Contributor

GKE was:

resource: {
  type: "gce_instance"
  labels: {
    project_id: "log-bench"
    zone: "us-west1-a"
    instance_id: "4837119632664073093"
  }
}

Should be:

resource: {
  type: "k8s_container"
  labels: {
    pod_name: "go-gke-6969bf5b9d-rwbw8"
    container_name: "hello-app"
    cluster_name: "go-gke"
    namespace_name: "default"
    project_id: "log-bench"
    location: "us-west1-a"
  }
}
@freelerobot freelerobot added the triage me I really want to be triaged. label May 10, 2021
@freelerobot freelerobot self-assigned this May 10, 2021
@product-auto-label product-auto-label bot added the api: logging Issues related to the Cloud Logging API. label May 10, 2021
@freelerobot freelerobot added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed triage me I really want to be triaged. labels May 10, 2021
@freelerobot
Copy link
Contributor Author

Available ENVVARS
KUBERNETES_SERVICE_PORT_HTTPS=443
KUBERNETES_SERVICE_PORT=443
HOSTNAME=log-go-gke-nicolezhx-6ccbd9769f-l2v46
PWD=/
ENABLE_SUBSCRIBER=true
HOME=/root
KUBERNETES_PORT_443_TCP=tcp://10.3.240.1:443
TERM=xterm
SHLVL=1
KUBERNETES_PORT_443_TCP_PROTO=tcp
KUBERNETES_PORT_443_TCP_ADDR=10.3.240.1
KUBERNETES_SERVICE_HOST=10.3.240.1
KUBERNETES_PORT=tcp://10.3.240.1:443
KUBERNETES_PORT_443_TCP_PORT=443
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PUBSUB_TOPIC=log-go-gke-nicolezhx
_=/usr/bin/printenv

———————————
Available metadata/attributes:
cluster-location
cluster-name
cluster-uid
configure-sh
created-by
disable-legacy-endpoints
enable-oslogin
gci-ensure-gke-docker
gci-metrics-enabled
gci-update-strategy
google-compute-enable-pcid
instance-template
kube-env
kube-labels
kubeconfig
kubelet-config
serial-port-logging-enable
user-data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant