Created
November 3, 2025 15:52
-
-
Save dimaqq/b6e3e6be3af6157651a0ac4233134108 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/peer/charmcraft.yaml b/peer/charmcraft.yaml | |
| index 8912d0f..656638f 100644 | |
| --- a/peer/charmcraft.yaml | |
| +++ b/peer/charmcraft.yaml | |
| @@ -21,6 +21,11 @@ parts: | |
| peers: | |
| world: | |
| interface: jgol | |
| +requires: | |
| + charm-tracing: | |
| + interface: tracing | |
| + limit: 1 | |
| + optional: true | |
| config: | |
| options: | |
| diff --git a/peer/pyproject.toml b/peer/pyproject.toml | |
| index 17a240b..39fbdcb 100644 | |
| --- a/peer/pyproject.toml | |
| +++ b/peer/pyproject.toml | |
| @@ -6,8 +6,8 @@ readme = "README.md" | |
| requires-python = ">=3.12" | |
| dependencies = [ | |
| # This will be fun later on, but don't want the extra dep yet | |
| - # "ops[tracing]", | |
| - "ops", | |
| + "ops[tracing]", | |
| + # "ops", | |
| ] | |
| # Testing tools configuration | |
| diff --git a/peer/src/charm.py b/peer/src/charm.py | |
| index 1c4c47a..579845f 100755 | |
| --- a/peer/src/charm.py | |
| +++ b/peer/src/charm.py | |
| @@ -17,6 +17,7 @@ class JGOLPeerCharm(ops.CharmBase): | |
| def __init__(self, framework: ops.Framework): | |
| super().__init__(framework) | |
| + self.tracing = ops.tracing.Tracing(self, "charm-tracing") | |
| framework.observe(self.on.collect_unit_status, self.cell) | |
| framework.observe(self.on.collect_app_status, self.god) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment