From ceb24df4cbe7293c4ac8f552e25d2d329f2e03b9 Mon Sep 17 00:00:00 2001 From: ali ugur Date: Tue, 21 Jan 2025 10:23:06 +0300 Subject: [PATCH 01/11] feat(tracing): Add commented out tracing relation into templates --- charmcraft/templates/init-django-framework/charmcraft.yaml.j2 | 4 ++++ .../templates/init-fastapi-framework/charmcraft.yaml.j2 | 4 ++++ charmcraft/templates/init-flask-framework/charmcraft.yaml.j2 | 4 ++++ charmcraft/templates/init-go-framework/charmcraft.yaml.j2 | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/charmcraft/templates/init-django-framework/charmcraft.yaml.j2 b/charmcraft/templates/init-django-framework/charmcraft.yaml.j2 index c60140ed2..b250123f5 100644 --- a/charmcraft/templates/init-django-framework/charmcraft.yaml.j2 +++ b/charmcraft/templates/init-django-framework/charmcraft.yaml.j2 @@ -55,3 +55,7 @@ extensions: # interface: rabbitmq # optional: false # limit: 1 +# tracing: +# interface: tracing +# optional: true +# limit: 1 diff --git a/charmcraft/templates/init-fastapi-framework/charmcraft.yaml.j2 b/charmcraft/templates/init-fastapi-framework/charmcraft.yaml.j2 index a8b24a74a..ed4bc7b39 100644 --- a/charmcraft/templates/init-fastapi-framework/charmcraft.yaml.j2 +++ b/charmcraft/templates/init-fastapi-framework/charmcraft.yaml.j2 @@ -57,3 +57,7 @@ extensions: # interface: rabbitmq # optional: false # limit: 1 +# tracing: +# interface: tracing +# optional: true +# limit: 1 diff --git a/charmcraft/templates/init-flask-framework/charmcraft.yaml.j2 b/charmcraft/templates/init-flask-framework/charmcraft.yaml.j2 index 888b49d25..d9f3611f7 100644 --- a/charmcraft/templates/init-flask-framework/charmcraft.yaml.j2 +++ b/charmcraft/templates/init-flask-framework/charmcraft.yaml.j2 @@ -55,3 +55,7 @@ extensions: # interface: rabbitmq # optional: false # limit: 1 +# tracing: +# interface: tracing +# optional: true +# limit: 1 diff --git a/charmcraft/templates/init-go-framework/charmcraft.yaml.j2 b/charmcraft/templates/init-go-framework/charmcraft.yaml.j2 index 8ddd8b05c..d7f7b2e2e 100644 --- a/charmcraft/templates/init-go-framework/charmcraft.yaml.j2 +++ b/charmcraft/templates/init-go-framework/charmcraft.yaml.j2 @@ -57,3 +57,7 @@ extensions: # interface: rabbitmq # optional: false # limit: 1 +# tracing: +# interface: tracing +# optional: true +# limit: 1 From 28042e56b19ff1be2081f361dc05ce567a99ad39 Mon Sep 17 00:00:00 2001 From: ali ugur Date: Tue, 21 Jan 2025 11:31:11 +0300 Subject: [PATCH 02/11] chore(docs): Add extension reference docs --- .../extensions/django-framework-extension.md | 47 ++++++++++-- .../extensions/fastapi-framework-extension.md | 73 +++++++++++++++++-- .../extensions/flask-framework-extension.md | 70 ++++++++++++++++-- .../extensions/go-framework-extension.md | 51 +++++++++++-- 4 files changed, 215 insertions(+), 26 deletions(-) diff --git a/docs/reference/extensions/django-framework-extension.md b/docs/reference/extensions/django-framework-extension.md index ba1450485..876197008 100644 --- a/docs/reference/extensions/django-framework-extension.md +++ b/docs/reference/extensions/django-framework-extension.md @@ -26,7 +26,7 @@ Django application with it. You can use the predefined options (run `charmcraft expand-extensions` for details) but also add your own, as needed. -In the latter case, any option you define will be used to generate environment variables; a user-defined option `config-option-name` will generate an environment variable named `DJANGO_CONFIG_OPTION_NAME` where the option name is converted to upper case, dashes will be converted to underscores and the `DJANGO_` prefix will be added. +In the latter case, any option you define will be used to generate environment variables; a user-defined option `config-option-name` will generate an environment variable named `DJANGO_CONFIG_OPTION_NAME` where the option name is converted to upper case, dashes will be converted to underscores and the `DJANGO_` prefix will be added. In either case, you will be able to set it in the usual way by running `juju config