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

[Docs] Update configuring_logging_links_in_the_ui.md #5861

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

pranshustuff
Copy link

@pranshustuff pranshustuff commented Oct 18, 2024

Added log templates for AWS CloudWatch, GCP Stackdriver, and Kubernetes logs with their templateUris in new example.

Also included prerequisites for CloudWatch Observability on EKS.

Tracking issue

Closes #5760

Why are the changes needed?

The current example is generic and uses outdated configuration:

What changes were proposed in this pull request?

I am just changing the example to be more flexible, up to date and with more specific templateUris.

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Docs link

https://docs.flyte.org/en/latest/user_guide/productionizing/configuring_logging_links_in_the_ui.html#configure-logging

Fixes flyteorg#5760

Added log templates for AWS CloudWatch, GCP Stackdriver, and Kubernetes logs with their templateUris in new example.

Also included prerequisites for CloudWatch Observability on EKS.


Signed-off-by: Pranshu <[email protected]>
Copy link

welcome bot commented Oct 18, 2024

Thank you for opening this pull request! 🙌

These tips will help get your PR across the finish line:

  • Most of the repos have a PR template; if not, fill it out to the best of your knowledge.
  • Sign off your commits (Reference: DCO Guide).

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 34.96%. Comparing base (38af4ec) to head (c1fb886).
Report is 45 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5861      +/-   ##
==========================================
- Coverage   36.72%   34.96%   -1.76%     
==========================================
  Files        1304     1144     -160     
  Lines      130072   122240    -7832     
==========================================
- Hits        47764    42744    -5020     
+ Misses      78138    75803    -2335     
+ Partials     4170     3693     -477     
Flag Coverage Δ
unittests-datacatalog 51.58% <ø> (ø)
unittests-flyteadmin 54.02% <ø> (-0.42%) ⬇️
unittests-flytecopilot 11.73% <ø> (ø)
unittests-flytectl ?
unittests-flyteidl 6.92% <ø> (+0.03%) ⬆️
unittests-flyteplugins 53.64% <ø> (+0.01%) ⬆️
unittests-flytepropeller 42.90% <ø> (+0.05%) ⬆️
unittests-flytestdlib 55.41% <ø> (+0.62%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pranshustuff pranshustuff changed the title Update configuring_logging_links_in_the_ui.md [Docs] Update configuring_logging_links_in_the_ui.md Oct 19, 2024
- displayName: AWS CloudWatch Logs
templateUris:
- "https://console.aws.amazon.com/cloudwatch/home?region={{.region}}#logEventViewer:group={{.logGroup}};stream=var.log.containers.{{.podName}}_{{.namespace}}_{{.containerName}}-{{.containerId}}.log"
prerequisites:
Copy link
Contributor

Choose a reason for hiding this comment

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

Please move the prerequisites to be a note outside of the code block as this is not a supported field.

@@ -58,11 +58,20 @@ task_logs:
plugins:
logs:
templates:
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
templates:

So the YAML structure would be:

  plugins:
    logs:
      cloudwatch-enabled: true
      cloudwatch-template-uri: 

- "https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logEventViewer:group=/flyte-production/kubernetes;stream=var.log.containers.{{.podName}}_{{.namespace}}_{{.containerName}}-{{.containerId}}.log"
- "https://some-other-source/home?region=us-east-1#logEventViewer:group=/flyte-production/kubernetes;stream=var.log.containers.{{.podName}}_{{.namespace}}_{{.containerName}}-{{.containerId}}.log"
messageFormat: 0 # this parameter is optional, but use 0 for "unknown", 1 for "csv", or 2 for "json"
- "https://console.cloud.google.com/logs/viewer?project={{.gcpProject}}&resource=k8s_container&advancedFilter=resource.labels.pod_name={{.podName}}&resource.labels.container_name={{.containerName}}&resource.labels.namespace_id={{.namespace}}"
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't tested this one but comparing with a working environment the structure is different. Let's leave this for a different PR

- "https://console.cloud.google.com/logs/viewer?project={{.gcpProject}}&resource=k8s_container&advancedFilter=resource.labels.pod_name={{.podName}}&resource.labels.container_name={{.containerName}}&resource.labels.namespace_id={{.namespace}}"
- displayName: Kubernetes Dashboard Logs
templateUris:
- "{{.kubernetesUrl}}/namespace/{{.namespace}}/pods/{{.podName}}/logs/{{.containerName}}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, haven't tried this and couldn't speak about the requirements so let's leave it out from this PR

@pranshustuff
Copy link
Author

I have made the required changed.

@davidmirror-ops
Copy link
Contributor

@pranshustuff we'd still like to see this contribution land, and would still count towards hacktoberfest. Could you take a look at the comments I left?

@pranshustuff
Copy link
Author

Yes please, if you can count it towards Hacktober fest that would be great, I'll figure out why it's not passing the unit test and send a few commits by tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Cold PRs
Development

Successfully merging this pull request may close these issues.

[Docs] Update logging links documentation for Cloudwatch
2 participants