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

[release-6.0] LOG-6756: Add timestamp to fix console #2965

Open
wants to merge 1 commit into
base: release-6.0
Choose a base branch
from

Conversation

cahartma
Copy link
Contributor

Description

Manual backport for 6.0. This fixes the console and aligns timestamp with the existing @timestamp We are still awaiting a Loki update to time-based sharding that will prevent any date concern as originally discussed in the ticket.

We will want to wait until the Loki update is implemented before marking this as resolved.

/cc @Clee2691 @vparfonov @xperimental
/assign @jcantrill

Links

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 19, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 19, 2025

@cahartma: This pull request references LOG-6756 which is a valid jira issue.

In response to this:

Description

Manual backport for 6.0. This fixes the console and aligns timestamp with the existing @timestamp We are still awaiting a Loki update to time-based sharding that will prevent any date concern as originally discussed in the ticket.

We will want to wait until the Loki update is implemented before marking this as resolved.

/cc @Clee2691 @vparfonov @xperimental
/assign @jcantrill

Links

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link
Contributor

openshift-ci bot commented Feb 19, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cahartma

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 19, 2025
Copy link
Contributor

openshift-ci bot commented Feb 19, 2025

@cahartma: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@jcantrill
Copy link
Contributor

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 20, 2025
@jcantrill jcantrill added release/6.0 and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 20, 2025
@jcantrill
Copy link
Contributor

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 20, 2025
@@ -1,5 +1,5 @@
{
"@timestamp": "2023-10-17T20:46:29.048949Z",
"timestamp": "2023-10-17T20:46:29.048949Z",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did @timestamp disappear for journal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, I can't recall off hand. Will investigate, as I suspect I had a reason for doing so.

@@ -61,6 +63,7 @@ func NewReceiver(ns, name string) *Receiver {
"-server.grpc-max-recv-msg-size-bytes", "20971520",
"-distributor.ingestion-rate-limit-mb", "200",
"-distributor.ingestion-burst-size-mb", "200",
"-validation.discover-log-levels=false",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this fail now and didn't before this submission?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated version of loki is the cause. Robert is aware and confirmed this is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comes from disabling detected_level in the Loki Operator. https://issues.redhat.com/browse/LOG-6286
It's the same for service_name, but the flag does not work properly for some reason. I've added a note, and instead added the field as a quick fix to the tests to include service_name in the expected query.

@@ -53,14 +53,14 @@ var _ = Describe("Log Format matcher tests", func() {
It("match same time value", func() {
timestamp := "2013-03-28T14:36:03.243000+00:00"
nanoTime, _ := time.Parse(time.RFC3339Nano, timestamp)
Expect(types.AllLog{ContainerLog: types.ContainerLog{ViaQCommon: types.ViaQCommon{Timestamp: nanoTime}}}).
To(FitLogFormatTemplate(types.AllLog{ContainerLog: types.ContainerLog{ViaQCommon: types.ViaQCommon{Timestamp: nanoTime}}}))
Expect(types.AllLog{ContainerLog: types.ContainerLog{ViaQCommon: types.ViaQCommon{TimestampLegacy: nanoTime}}}).
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldnt we be testing for population of both values since we are sending both for backwards compatibility?

Copy link
Contributor Author

@cahartma cahartma Mar 17, 2025

Choose a reason for hiding this comment

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

The original idea was we wanted to remove the original field because we determined it has no value. As an alternative, we kept both to help ensure no regression issues. But, you are correct. I'll edit to ensure both are tested here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. release/6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants