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

Keep only two routers, one for docker and another for crio/containerd #828

Closed

Conversation

VihasMakwana
Copy link

@VihasMakwana VihasMakwana commented Jul 5, 2023

See #819.

We can use two routers as, crio and containerd are similar
The recombine operator is same for both crio and containerd, so we can use just one.

This also fixes an probable issue signalfx/splunk-otel-collector-chart#644

@Allex1
Copy link
Contributor

Allex1 commented Jul 5, 2023

@VihasMakwana thanks for your contribution .Please follow our guide in order for the ci to pass.

Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

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

@VihasMakwana can please share how you tested this change to be equivalent to the current solution of using 2 routers? @djaglowski can you share your thoughts on the changes to the filelogreceiver configuration?

@VihasMakwana
Copy link
Author

So, for this, I have tested it the following way:

  • For docker-based containers, I have tested them using minikube and splunk_hec to verify the timestamps and event delivery

  • For crio and containerd-based containers, I have tested them using minikube and microk8s, and splunk_hec to verify the timestamps and event delivery and covered the following scenarios:

    • Used zulu timestamp and verified that it was being received with no errors
    • Used timestamp with local offset (rfc3393 spec) and verified that it was being received with no errors

Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

I agree that the recombine operators for crio vs containerd are redundant and can be consolidated, but I do not understand the other changes.

At a glance the regex changes do not look correct to me. Can you give some specific examples that demonstrate how "^[^ Z]+ " and "^[^ Z]+Z" are correctly combined into "^[^ ]+ "?

@VihasMakwana
Copy link
Author

VihasMakwana commented Jul 6, 2023

@djaglowski please check signalfx/splunk-otel-collector-chart#644.
I made changes to regex because it was hard-coded to accept zulu.

My bad, forgot to mention this in PR description ;(

@VihasMakwana
Copy link
Author

"^[^ ]+ " matches the timestamp.
It will match 2023-01-23T12:09:28.344779078-06:00 and also, 2023-07-06T13:08:23.702Z.
"^[^ Z]+Z" only matches the zulu timestamp and "^[^ Z]+ " only matches non-zulu i.e. with timezone offset.

@VihasMakwana
Copy link
Author

Also, 2006-01-02T15:04:05.999999999Z07:00 will be able to parse both, zulu and non-Zulu ones.

@djaglowski
Copy link
Member

Thanks for explaining @VihasMakwana. I think your explanation of the regexes makes sense but I haven't tested them so I'd appreciate others to look at this as well.

Personally I find it confusing that there is a bug fix in the same PR as non-functional changes. Both changes would be simpler to understand if presented in isolation. Perhaps you'd consider splitting the PR.

Finally, if these changes are accepted here, would you please submitting equivalent PRs to the contrib example here?

@VihasMakwana
Copy link
Author

Makes sense.
But the issue is about keeping two routers, and for that to accomplish the changes in regex is required. And that also fixes the issue I attached in previous comment.

@VihasMakwana
Copy link
Author

and yes, will submit PRs to contrib.

@TylerHelmuth
Copy link
Member

@VihasMakwana have users of signalfx/splunk-otel-collector-chart gotten the chance to use these changes you've applied to that chart? This is a unique situation where we have the ability to confirm something in the field before merging it and I'd like to take advantage of that.

@VihasMakwana
Copy link
Author

Hmm, I have an open PR for the similar thing in splunk repo, maybe we can wait until that one gets accepted and tested?

Copy link
Contributor

@povilasv povilasv left a comment

Choose a reason for hiding this comment

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

This looks fine to me

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jul 22, 2023
@VihasMakwana
Copy link
Author

^^

@github-actions github-actions bot removed the Stale label Jul 23, 2023
@atoulme
Copy link

atoulme commented Jul 31, 2023

LGTM. Can you fix the lint issue?

@VihasMakwana
Copy link
Author

@atoulme done

@TylerHelmuth
Copy link
Member

@VihasMakwana have you had a chance to release this in the Splunk helm chart and confirm it is equivalent?

@VihasMakwana
Copy link
Author

@TylerHelmuth No, not yet. If you or anyone else can test this out on your end, it would be of great help ;).

@VihasMakwana
Copy link
Author

@atoulme can you re-review this one?

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Sep 6, 2023
@github-actions
Copy link

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants