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

[Doc] Logging: Add Fluent Bit sidecar and Grafana Loki to Persist Ray logs #49038

Merged
merged 5 commits into from
Dec 11, 2024

Conversation

win5923
Copy link
Contributor

@win5923 win5923 commented Dec 3, 2024

Why are these changes needed?

  • Add a tutorial on how to set up Fluent Bit sidecar logging with Grafana Loki on Kubernetes. The FluentBit sidecar container redirects logs from /tmp/ray/session_latest/logs to Grafana Loki.
  • Using downward API to fetch pod metadata labels. This allows users to configure Fluent Bit to assign logs based on specific labels, such as ray.io/cluster
env:
  - name: POD_LABELS
    valueFrom:
      fieldRef:
        fieldPath: metadata.labels['ray.io/cluster']
  • Users can modify the Fluent Bit ConfigMap's Labels to associate logs with different RayCluster / RayJob CRs.
Labels RayCluster=raycluster-xxxx
Labels RayJob=rayjob-xxxx

Related issue number

ray-project/kuberay#2515

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@win5923 win5923 force-pushed the sidecar/loki branch 4 times, most recently from aaf96d4 to aee3a8a Compare December 3, 2024 16:43
@kevin85421 kevin85421 self-assigned this Dec 3, 2024
@win5923 win5923 force-pushed the sidecar/loki branch 5 times, most recently from f8a10af to d2d5ed0 Compare December 5, 2024 14:47
@jcotant1 jcotant1 added the core Issues that should be addressed in Ray Core label Dec 9, 2024
Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

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

I will polish the doc after this PR is merged

Copy link
Contributor

@angelinalg angelinalg left a comment

Choose a reason for hiding this comment

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

Feel free to correct any inaccuracies in my rewrites. The suggestions are mostly removing passive voice.

Copy link
Contributor

@angelinalg angelinalg left a comment

Choose a reason for hiding this comment

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

Approving so as to not block.

… logs

Signed-off-by: win5923 <ken89@kimo.com>
win5923 and others added 4 commits December 10, 2024 21:06
…om-resource-logs.md

Co-authored-by: angelinalg <122562471+angelinalg@users.noreply.github.com>
Signed-off-by: Blocka <ken89@kimo.com>
…om-resource-logs.md

Co-authored-by: angelinalg <122562471+angelinalg@users.noreply.github.com>
Signed-off-by: Blocka <ken89@kimo.com>
…om-resource-logs.md

Co-authored-by: angelinalg <122562471+angelinalg@users.noreply.github.com>
Signed-off-by: Blocka <ken89@kimo.com>
…om-resource-logs.md

Co-authored-by: angelinalg <122562471+angelinalg@users.noreply.github.com>
Signed-off-by: Blocka <ken89@kimo.com>
@win5923
Copy link
Contributor Author

win5923 commented Dec 10, 2024

Thanks for @kevin85421 and @angelinalg's reviews. I've completed the style fixes.

@kevin85421 kevin85421 added the go add ONLY when ready to merge, run all tests label Dec 10, 2024
@jjyao jjyao merged commit 789e1c8 into ray-project:master Dec 11, 2024
6 checks passed
@win5923 win5923 deleted the sidecar/loki branch December 11, 2024 08:19
simonsays1980 pushed a commit to simonsays1980/ray that referenced this pull request Dec 12, 2024
ujjawal-khare pushed a commit to ujjawal-khare-27/ray that referenced this pull request Dec 17, 2024
… logs (ray-project#49038)

Signed-off-by: win5923 <ken89@kimo.com>
Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants