diff --git a/.github/vale/styles/config/vocabularies/Aiven/accept.txt b/.github/vale/styles/config/vocabularies/Aiven/accept.txt index a313cb534..a3da3e978 100644 --- a/.github/vale/styles/config/vocabularies/Aiven/accept.txt +++ b/.github/vale/styles/config/vocabularies/Aiven/accept.txt @@ -44,6 +44,7 @@ booleans? boot BTAR Bucardo +bundler business BYOC Cassandra diff --git a/docs/products/runtime/runtime-logs.md b/docs/products/runtime/runtime-logs.md new file mode 100644 index 000000000..1ca216852 --- /dev/null +++ b/docs/products/runtime/runtime-logs.md @@ -0,0 +1,133 @@ +--- +title: Aiven Runtime logs +sidebar_label: Runtime logs +--- + +import ConsoleLabel from "@site/src/components/ConsoleIcons"; +import {ConsoleIcon} from "@site/src/components/ConsoleIcons"; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +Runtime produces build and runtime logs for your applications to help you monitor them and troubleshoot issues throughout their lifecycle. + +## Build logs + +Build-time logs capture the build process from source code checkout +through application packaging. Use build logs to understand what happens +before your application starts serving traffic. + +You can use these logs to diagnose build failures. Information available +in the logs can include: + +- Source repository authentication or checkout failures +- Detected language, framework, and toolchain versions +- Dependency installation or version-resolution errors +- Build command output and exit codes +- Compiler, bundler, or test errors +- Packaging or container image creation failures +- Build duration and commit revision + +To access build logs: + + + + +1. In your project, click . +1. Open your application. +1. Click . + + + + +Use the `POST /v1/project/PROJECT_NAME/service/SERVICE_NAME/logs` endpoint: + +```bash +curl -X POST "https://api.aiven.io/v1/project/PROJECT_NAME/service/SERVICE_NAME/logs" \ + -H "Authorization: Bearer $AIVEN_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ + "log_type": "application-build" + }' +``` + +The endpoint supports pagination, severity filtering, limits, +and ascending or descending sort order. + + + + +## Runtime logs + +Runtime logs capture output from your application when it is launched +and while it is running. +Use these to monitor your application's behavior, such as: + +- Startup and configuration errors +- Successful startup and port binding +- Exceptions and stack traces +- Request handling and application events +- Database or external service connection failures +- Crashes, restarts, and shutdown events +- Resource-related termination signals + + +To access runtime logs: + + + + +1. In your project, click . +1. Open your application. +1. Click . + + + + +Use the [`avn service logs`](https://github.com/aiven/aiven-client) command to retrieve logs: + +```bash +avn service logs SERVICE_NAME +``` + + + + +Use the `POST /v1/project/PROJECT_NAME/service/SERVICE_NAME/logs` endpoint: + +```bash +curl -X POST "https://api.aiven.io/v1/project/PROJECT_NAME/service/SERVICE_NAME/logs" \ + -H "Authorization: Bearer $AIVEN_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ + "log_type": "application-run" + }' +``` + +The endpoint supports pagination, severity filtering, limits, +and ascending or descending sort order. + + + + +## Log retention + +Both log types are available for 24 hours. +To retain logs beyond this window, set up a log integration. + +## Log integrations + +Continuously export logs to centralized systems for searching, dashboards, and alerting. + +Runtime exposes both log sources: + +- `application.service` for runtime logs +- `build.service` for build logs + +You can integrate with: + +- [Aiven for OpenSearch](/docs/products/opensearch/howto/opensearch-log-integration) +- [Apache Kafka®](/docs/products/kafka/howto/integrate-service-logs-into-kafka-topic) +- [AWS CloudWatch Logs](/docs/integrations/cloudwatch/cloudwatch-logs-console) +- [Google Cloud Logging](/docs/integrations/cloudlogging) +- [External Elasticsearch or OpenSearch](/docs/integrations/send-logs-to-elasticsearch) +- [Remote syslog](/docs/integrations/rsyslog) diff --git a/external/terraform-provider b/external/terraform-provider index 7fd54b6e6..c8d7f0f7f 160000 --- a/external/terraform-provider +++ b/external/terraform-provider @@ -1 +1 @@ -Subproject commit 7fd54b6e6ad1af3c8a3c4ad95bc6e48496d776a4 +Subproject commit c8d7f0f7f1e63eec772ecef9057481f6f324ba6e diff --git a/sidebars.ts b/sidebars.ts index 6b2c3120b..4ff882d7d 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -497,6 +497,7 @@ const sidebars: SidebarsConfig = { }, ], }, + 'products/runtime/runtime-logs', ], }, ], diff --git a/src/components/ConsoleIcons/index.tsx b/src/components/ConsoleIcons/index.tsx index aa1d01273..d14453646 100644 --- a/src/components/ConsoleIcons/index.tsx +++ b/src/components/ConsoleIcons/index.tsx @@ -245,6 +245,18 @@ export default function ConsoleLabel({name}): ReactElement { Logs ); + case 'runtimelogs': + return ( + <> + Runtime logs + + ); + case 'buildlogs': + return ( + <> + Build logs + + ); case 'integrationendpoints': return ( <>