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

Add COS integration and metric logs #13

Merged
merged 105 commits into from
Dec 10, 2024
Merged

Add COS integration and metric logs #13

merged 105 commits into from
Dec 10, 2024

Conversation

yhaliaw
Copy link
Contributor

@yhaliaw yhaliaw commented Dec 6, 2024

Overview

  • Add support for cos-agent integration. This will enable ingestion of logs on the charm to COS.
  • Add logging of metrics of the nginx.

Rationale

The two changes will allow metrics to be ingested to COS for a dashboard to be built.

Checklist

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 78 files.

Valid Invalid Ignored Fixed
37 2 39 0
Click to see the invalid file list
  • content-cache/lib/charms/grafana_agent/v0/cos_agent.py
  • lib/charms/grafana_agent/v0/cos_agent.py
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

lib/charms/grafana_agent/v0/cos_agent.py Outdated Show resolved Hide resolved
lib/charms/grafana_agent/v0/cos_agent.py Outdated Show resolved Hide resolved
lib/charms/grafana_agent/v0/cos_agent.py Outdated Show resolved Hide resolved
lib/charms/grafana_agent/v0/cos_agent.py Outdated Show resolved Hide resolved
@yhaliaw yhaliaw changed the base branch from main to track/1 December 6, 2024 07:12
@yhaliaw yhaliaw added the trivial label Dec 6, 2024
@yhaliaw yhaliaw marked this pull request as ready for review December 6, 2024 09:52
Copy link

@alithethird alithethird left a comment

Choose a reason for hiding this comment

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

Looks good, minor doc comments.

content-cache/docs/how-to/enable-cos.md Outdated Show resolved Hide resolved
content-cache/docs/how-to/enable-cos.md Outdated Show resolved Hide resolved
@jdkandersson
Copy link

For your next PR, please do the public interface first and get it reviewed by the allocated senior reviewer. You can read more in ISD062

Copy link
Contributor

Test coverage for 6361378

Name                   Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------
src/certificates.py       21      2      6      2    85%   65-68
src/charm.py             101     12      8      0    89%   64-65, 120, 149, 153-156, 209-211, 222-224
src/errors.py             16      0      0      0   100%
src/nginx_manager.py     130     21     18      4    83%   142-144, 151, 154-160, 163, 201-203, 254-256, 272-276, 293->295
src/state.py             141      9     36      1    93%   353-363
src/utilities.py          13      0      0      0   100%
------------------------------------------------------------------
TOTAL                    422     44     68      7    89%

Static code analysis report

Run started:2024-12-10 03:16:20.370788

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 931
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 2

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@yhaliaw yhaliaw merged commit 182e108 into main Dec 10, 2024
29 checks passed
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.

3 participants