Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fluentd-gcp 2.0.5 doesn't work with json output to stdout #48108

@maisem

Description

@maisem

1.6.6 shifted the fluentd-gcp image from 2.0.2 to 2.0.5. This seems to have broken the json detection from stdout. Using 2.0.2 the logs are parsed into jsonPayload, however for 2.0.5 they are passed into textPayload.

Reproduction steps:

  1. Create a GKE cluster with master version 1.6.4
  2. Deploy a dummy pod to echo some JSON to stdout:
 apiVersion: v1
    kind: Pod
    metadata:
      name: blabbermouth
    spec:
      containers:
      - name: busybox
        image: gcr.io/google-containers/busybox
        command: ['sh', '-c', 'while :; do echo "{\"severity\": \"INFO\", \"message\": \"test\"}"; sleep 5; done']
  1. Lookup container logs in StackDriver: resource.type="container" and resource.labels.container_name="busybox"
  2. Observe that jsonPayload field of each logEntry is populated with the app's output JSON
  3. Upgrade the GKE master to 1.6.6.
  4. Observe that the log query in 4 now shows each logEntry with the output in a textPayload.

cc: @jlowdermilk @crassirostris @piosz

Metadata

Metadata

Assignees

Labels

area/loggingsig/instrumentationCategorizes an issue or PR as relevant to SIG Instrumentation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions