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

Fluentbit improvements #189

Merged
merged 4 commits into from
Jul 13, 2023
Merged

Fluentbit improvements #189

merged 4 commits into from
Jul 13, 2023

Conversation

bonclay7
Copy link
Member

@bonclay7 bonclay7 commented Jul 7, 2023

What does this PR do?

Cleans up log format for logs collected by FluentBit

Before:

{
    "log": "2023-06-23T12:25:48.21020769Z stderr F 2023-06-23T12:25:48.210Z\tinfo\tMetricsExporter\t{\"kind\": \"exporter\", \"data_type\": \"metrics\", \"name\": \"logging\", \"resource metrics\": 1, \"metrics\": 336, \"data points\": 866}",
    "kubernetes": {
        "pod_name": "adot-collector-67ddcff9d8-phwpj",
        "namespace_name": "adot-collector-kubeprometheus",
        "pod_id": "a6265b55-e0f1-446d-94a3-36fe02c2d05f",
        "labels": {
            "app.kubernetes.io/component": "opentelemetry-collector",
            "app.kubernetes.io/instance": "adot-collector-kubeprometheus.adot",
            "app.kubernetes.io/managed-by": "opentelemetry-operator",
            "app.kubernetes.io/name": "adot-collector",
            "app.kubernetes.io/part-of": "opentelemetry",
            "app.kubernetes.io/version": "latest",
            "pod-template-hash": "67ddcff9d8"
        },
        "annotations": {
            "opentelemetry-operator-config/sha256": "86cffa06e194ca52e19c880e5e4dd8e5f0da8275e407a9c93d91cae1254fe772"
        },
        "host": "ip-10-0-10-151.eu-central-1.compute.internal",
        "container_name": "otc-container",
        "docker_id": "0561f678444c7ba55acc3e47735c620ca81c907a1708fe75f39794a784465e4b",
        "container_image": "public.ecr.aws/aws-observability/aws-otel-collector:v0.29.1"
    }
}

After:

2023-07-07T14:45:09.178Z	info	MetricsExporter	{
    "kind": "exporter",
    "data_type": "metrics",
    "name": "logging",
    "resource metrics": 1,
    "metrics": 16,
    "data points": 1206
}

Motivation

  • Removes stdout infos and k8s log attributes
  • "Attempts" at parsing multi log line from fluentBit native multiline parsers

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • Yes, I ran pre-commit run -a with this PR
  • Yes, I have added a new example under examples to support my PR (when applicable)
  • Yes, I have updated the Pages for this feature

Note: Not all the PRs required examples and docs.

@bonclay7 bonclay7 requested a review from lewinkedrs July 7, 2023 15:42
@bonclay7
Copy link
Member Author

bonclay7 commented Jul 7, 2023

@lewinkedrs need your opinion on this

@bonclay7 bonclay7 requested a review from elamaran11 July 13, 2023 08:41
elamaran11
elamaran11 previously approved these changes Jul 13, 2023
Copy link
Contributor

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

lewinkedrs
lewinkedrs previously approved these changes Jul 13, 2023
Copy link
Contributor

@lewinkedrs lewinkedrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved!

@bonclay7 bonclay7 dismissed stale reviews from lewinkedrs and elamaran11 via a86be02 July 13, 2023 16:08
@bonclay7 bonclay7 temporarily deployed to Observability Test July 13, 2023 16:08 — with GitHub Actions Inactive
@bonclay7 bonclay7 merged commit f29113f into main Jul 13, 2023
27 checks passed
@bonclay7 bonclay7 deleted the fluentbit-impr branch July 13, 2023 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants