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 charm tracing #281

Merged
merged 2 commits into from Mar 20, 2024
Merged

Add charm tracing #281

merged 2 commits into from Mar 20, 2024

Conversation

mmkay
Copy link
Contributor

@mmkay mmkay commented Mar 18, 2024

Summary

Add charm tracing to grafana-agent-k8s.

Testing Instructions

It looks like there's no cross-model bundle support: https://discourse.charmhub.io/t/can-a-bundle-define-a-model/1341/2 (feel free to correct me!) so instructions need to be a bit more complicated.

Deploy cos-lite and tempo-k8s in one model and create offers for tracing and prometheus:

juju deploy cos-lite --channel edge --trust
juju deploy tempo-k8s --channel edge
jhack imatrix fill
juju offer prometheus:receive-remote-write prometheus-receive-remote-write
juju offer tempo-k8s:tracing tracing

Then in another model, deploy the following bundle:

bundle: kubernetes
saas:
  prometheus-receive-remote-write:
    url: microk8s:admin/cos.prometheus-receive-remote-write
  tracing:
    url: microk8s:admin/cos.tracing
applications:
  grafana-agent:
    charm: local:grafana-agent-k8s-0
    scale: 1
    constraints: arch=amd64
    storage:
      data: kubernetes,1,1024M
  zinc-k8s:
    charm: zinc-k8s
    channel: stable
    revision: 132
    resources:
      zinc-image: 117
    scale: 1
    constraints: arch=amd64
    storage:
      data: kubernetes,1,1024M
relations:
- - zinc-k8s:metrics-endpoint
  - grafana-agent:metrics-endpoint
- - grafana-agent:send-remote-write
  - prometheus-receive-remote-write:receive-remote-write
- - grafana-agent:tracing
  - tracing:tracing

You should see traces from grafana-agent in grafana:

Screenshot from 2024-03-18 10-21-36

Upgrade Notes

lib/charms/tempo_k8s/v1/charm_tracing.py Dismissed Show dismissed Hide dismissed
@mmkay mmkay marked this pull request as ready for review March 18, 2024 10:44
@mmkay mmkay merged commit edeb41c into main Mar 20, 2024
13 checks passed
@mmkay mmkay deleted the add-charm-tracing branch March 20, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants