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

Tempo tracing #20

Open
wants to merge 62 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
eca6a14
feat(tracing): Init gunicorn tracing
alithethird Dec 16, 2024
0fabc4f
chore(example): Change paas-charm branch in example flask
alithethird Dec 16, 2024
7fa73fe
chore(example): Fix missing import and libraries
alithethird Dec 16, 2024
4da5103
chore(): Fix wrong function
alithethird Dec 16, 2024
311854f
feat(tracing): Remove unused topology, bring order to code
alithethird Dec 17, 2024
8ba4b39
feat(tracing): Implemented environmental approach
alithethird Dec 17, 2024
5df179c
chore(): Remove unnecessary log
alithethird Dec 17, 2024
ae59283
chore(): Write interface
alithethird Dec 18, 2024
f9b6b3c
chore(): Cleaning
alithethird Dec 18, 2024
99172b1
chore(): More cleaning
alithethird Dec 18, 2024
f999115
chore(): Remove empty line
alithethird Dec 18, 2024
b3f845b
chore(): Add unit test for env variables.
alithethird Dec 18, 2024
ca89e47
chore(): Addressed comment
alithethird Dec 19, 2024
259648d
chore(): Modify examples to test out tracing.
alithethird Jan 6, 2025
6cda4e5
chore(lint): Format code
alithethird Jan 6, 2025
ea0cf59
Merge remote-tracking branch 'origin/main' into tempo-tracing
alithethird Jan 6, 2025
8187b23
chore(tracing): Update examples.
alithethird Jan 8, 2025
f8c68ce
chore(examples): Fix naming issues with tracing apps examples.
alithethird Jan 8, 2025
6f77bb3
chore(lint): Lint
alithethird Jan 9, 2025
678276e
chore(fix): Fix gunicorn fork tracer
alithethird Jan 9, 2025
484f191
chore(test): Add tracing image options
alithethird Jan 9, 2025
f547d3a
chore(test): Fix test tracing image option name
alithethird Jan 9, 2025
d5b34a4
chore(test): Fix options
alithethird Jan 9, 2025
1a44207
chore(test): Add integration test for flask tracing
alithethird Jan 10, 2025
cccd115
chore: Format
alithethird Jan 10, 2025
3946636
chore(test): Add tracing test to workflow
alithethird Jan 10, 2025
d53b8a4
chore(): Licence update
alithethird Jan 10, 2025
40abab8
Merge branch 'main' into tempo-tracing
alithethird Jan 10, 2025
47f1de3
chore(test): Fix test
alithethird Jan 10, 2025
f7e5225
chore(test): Fix tracing integration test
alithethird Jan 13, 2025
37c447f
Merge branch 'tempo-tracing' of https://github.com/canonical/paas-cha…
alithethird Jan 13, 2025
b372dcb
chore(test): Merge
alithethird Jan 13, 2025
5b4c95e
chore(lint): Format code
alithethird Jan 13, 2025
4d60d13
Merge branch 'main' into tempo-tracing
alithethird Jan 13, 2025
02624c5
chore(Format): Remove unnecessary files and format code
alithethird Jan 15, 2025
47d5b91
Merge branch 'tempo-tracing' of https://github.com/canonical/paas-cha…
alithethird Jan 15, 2025
068a3c1
Chore(test): Fix unit test
alithethird Jan 15, 2025
a12f204
Chore(test): Fix false positive
alithethird Jan 15, 2025
af0c47c
chore(format):format
alithethird Jan 15, 2025
707af93
Chore(test): Skip if juju <=3.4
alithethird Jan 15, 2025
1ca07aa
Chore(format): Format
alithethird Jan 15, 2025
f566767
Chore(test): juju version skip fixed.
alithethird Jan 15, 2025
0e090cc
chore(): Skip test at model level
alithethird Jan 15, 2025
32fb470
Chore(): Change matrix to not include workload stuff for juju 3.3
alithethird Jan 15, 2025
66fb938
chore(test): Move all tracing tests into one module and parametrize f…
alithethird Jan 16, 2025
e1624fe
Chore(): Cleanup the code and update docstrings.
alithethird Jan 16, 2025
2650b7b
chore(): Update app.py
alithethird Jan 16, 2025
ebcccf4
chore():Address comments
alithethird Jan 16, 2025
fbc66ab
Merge branch 'tempo-tracing' of https://github.com/canonical/paas-cha…
alithethird Jan 16, 2025
cdb1902
Chore(): Fix
alithethird Jan 16, 2025
f7e9645
chore(test): Improve tests
alithethird Jan 17, 2025
a5bd4fe
chore(trivy): Add back Go stdlib ignore
alithethird Jan 17, 2025
4f05ded
chore(trivy): Add back
alithethird Jan 17, 2025
4fa1502
chore(test): Remove extra examples. Integrate tracing into default ex…
alithethird Jan 20, 2025
1553689
Chore(example): Fix go example
alithethird Jan 20, 2025
d2705ec
Chore(example): Remove commented out line
alithethird Jan 20, 2025
ddc57f9
Chore(test): Fix
alithethird Jan 20, 2025
c64b3fb
Chore(lint): Lint
alithethird Jan 20, 2025
ad85be9
Chore(template): turned gunicorn conf into jinja template
alithethird Jan 20, 2025
590d787
Merge branch 'main' into tempo-tracing
alithethird Jan 20, 2025
7d783d1
Chore(test): Updates app fixtures in integrations tests
alithethird Jan 21, 2025
38d7f1e
Merge branch 'tempo-tracing' of https://github.com/canonical/paas-cha…
alithethird Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
extra-arguments: -x --localstack-address 172.17.0.1
pre-run-script: localstack-installation.sh
charmcraft-channel: latest/edge
modules: '["test_charm.py", "test_cos.py", "test_database.py", "test_db_migration.py", "test_django.py", "test_django_integrations.py", "test_fastapi.py", "test_go.py", "test_integrations.py", "test_proxy.py", "test_workers.py"]'
modules: '["test_charm.py", "test_cos.py", "test_database.py", "test_db_migration.py", "test_django.py", "test_django_integrations.py", "test_fastapi.py", "test_go.py", "test_integrations.py", "test_proxy.py", "test_workers.py", "test_tracing.py"]'
rockcraft-channel: latest/edge
juju-channel: ${{ matrix.juju-version }}
channel: 1.29-strict/stable
Expand Down
19 changes: 19 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.

from flask import Flask
alithethird marked this conversation as resolved.
Show resolved Hide resolved
import time

app = Flask(__name__)


@app.route("/")
def index():
return "Hello, world!"

@app.route("/io")
def io_bound_task():
start_time = time.time()
time.sleep(2)
duration = time.time() - start_time
return f"I/O task completed in {round(duration, 2)} seconds"
2 changes: 1 addition & 1 deletion docs/.sphinx/_static/css/pdf.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
margin-left: -0.5rem;
padding-left: .5rem;
padding-right: .5rem;
}
}
1 change: 0 additions & 1 deletion docs/explanation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ on key topics related to the use and configuration of

.. toctree::
:maxdepth: 1

2 changes: 0 additions & 2 deletions docs/tutorial/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ Developer tutorials for the 12-factor app project.

.. toctree::
:maxdepth: 1


4 changes: 4 additions & 0 deletions examples/django/charm/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ requires:
interface: postgresql_client
optional: False
limit: 1
tracing:
interface: tracing
optional: True
limit: 1
resources:
django-app-image:
description: django application image.
Expand Down
Loading
Loading