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

feat(logs): Changing the default logs metadata provider to otel #2621

Merged
merged 3 commits into from
Nov 22, 2022

Conversation

rnishtala-sumo
Copy link
Contributor

@rnishtala-sumo rnishtala-sumo commented Nov 18, 2022

Description
  • Changing the default logs metadata provider to otel
  • Integration test changes
  • Added an integration test for fluentd and changed the default installation test to otel.

Checklist
  • Changelog updated
Testing performed
  • Redeploy metadata-logs and fluentbit
  • Confirm logs and metrics are coming in

Comment on lines 303 to 318
"cluster": "kubernetes",
"namespace": internal.LogsGeneratorName,
"pod_labels_app": internal.LogsGeneratorName,
"container": internal.LogsGeneratorName,
"deployment": internal.LogsGeneratorName,
"replicaset": "",
"namespace_id": "",
"pod": "",
"pod_id": "",
"container_id": "",
"host": "",
"master_url": "",
"node": "",
"_sourceName": "",
"_sourceCategory": "",
"_sourceHost": "",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we removed some of the expected metadata?

Copy link
Contributor Author

@rnishtala-sumo rnishtala-sumo Nov 21, 2022

Choose a reason for hiding this comment

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

the expected metadata changes for otelcol, it has an additional entry and a few other changes like below:
"_collector": "kubernetes"

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious what happened with _source*, these are pretty crucial fields and we should have it in sumo 😬

Copy link
Contributor Author

@rnishtala-sumo rnishtala-sumo Nov 21, 2022

Choose a reason for hiding this comment

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

got it, I have added those _source* fields to the tests and pushed the changes, and the tests do pass.

- hostPath:
path: /run/log/journal
type: DirectoryOrCreate
name: run-log-journal
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
name: run-log-journal
name: run-log-journal

}).
Feature()

featMetrics := features.New("metrics").
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is a logs test (as name implies), then why do we test the metrics?

Copy link
Contributor Author

@rnishtala-sumo rnishtala-sumo Nov 21, 2022

Choose a reason for hiding this comment

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

that's a good point I'll remove the metrics tests and only keep the logs tests.

Copy link

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

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

I thought a bit more about the test changes, and I think this will be much simpler if we only changes the values.yaml for the tests for now. We can reorganize the tests after we'd changes all the defaults.

@rnishtala-sumo
Copy link
Contributor Author

rnishtala-sumo commented Nov 21, 2022

@swiatekm-sumo it looks like we need changes like these in the tests (outside values.yaml for the tests) when we change the logs default to otelcol, for the tests to pass.
https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/2621/files#diff-5bdd3491954e96c5de4930d0097c8ee092aec3c7dd6184e3bf3a4c02d372bf0bR47

@swiatekm
Copy link

swiatekm commented Nov 21, 2022

@swiatekm-sumo it looks like we need changes like these in the tests (outside values.yaml for the tests) when we change the logs default to otelcol, for the tests to pass. https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/2621/files#diff-5bdd3491954e96c5de4930d0097c8ee092aec3c7dd6184e3bf3a4c02d372bf0bR47

What I meant was that you should instead change this config file: https://github.com/SumoLogic/sumologic-kubernetes-collection/blob/main/tests/integration/values/values_helm_default_fluentd_metadata.yaml to use fluentd as the provider.

Copy link

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@rnishtala-sumo rnishtala-sumo merged commit 44dfebb into main Nov 22, 2022
@rnishtala-sumo rnishtala-sumo deleted the rnishtala-otel-default branch November 22, 2022 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants