-
Couldn't load subscription status.
- Fork 13
[PMK-9657] feat: added open next docs #1833
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
base: main
Are you sure you want to change the base?
Conversation
src/content/docs/en/pages/devtools/azion-edge-runtime/nextjs/2023-02-14-index.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/en/pages/devtools/azion-edge-runtime/nextjs/2023-02-14-index.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/en/pages/devtools/azion-edge-runtime/nextjs/2023-02-14-index.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: MarianaReisAlcantara <mariana.alcantara@azion.com>
Co-authored-by: MarianaReisAlcantara <mariana.alcantara@azion.com>
src/content/docs/en/pages/devtools/azion-edge-runtime/nextjs/2023-02-14-index.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/en/pages/guides/open-next/get-started-opennext.mdx
Outdated
Show resolved
Hide resolved
|
|
||
| 5. Set Up Caching and Storage: | ||
|
|
||
| See the [Caching Guide](/azion/caching) for how to configure Azion Object Storage and Cache for ISR/SSG. Example Azion config: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
esse link tá completo?
src/content/docs/en/pages/guides/open-next/get-started-opennext.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/en/pages/guides/open-next/get-started-opennext.mdx
Outdated
Show resolved
Hide resolved
| - See [Known Issues](/en/documentation/devtools/azion-edge-runtime/compatibility/nextjs/#known-issues) for important config notes. | ||
| - See [Troubleshooting](/en/documentation/products/guides/opennext/troubleshooting/) for local dev, logging, and debugging tips. | ||
| - Explore [Examples](/en/documentation/devtools/azion-edge-runtime/compatibility/nextjs/#examples) for starter projects and templates. | ||
| - For advanced caching, see [Caching](/azion/caching). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link ta correto?
| --- | ||
| title: Troubleshooting an OpenNext Application | ||
| description: >- | ||
| Learn how to troubleshoot OpenNext apps on Azion: run locally with Azion CLI, tail logs, use Real‑Time Events, Metadata & GraphQL APIs, fix size limits and environment variables. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apps ou application?
src/content/docs/en/pages/guides/open-next/troubleshooting-opennext.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/en/pages/guides/open-next/troubleshooting-opennext.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/en/pages/guides/open-next/troubleshooting-opennext.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/en/pages/guides/open-next/troubleshooting-opennext.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/en/pages/guides/open-next/troubleshooting-opennext.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/en/pages/guides/open-next/troubleshooting-opennext.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/en/pages/guides/open-next/troubleshooting-opennext.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/pt-br/pages/devtools/azion-edge-runtime/nextjs/nextjs.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/pt-br/pages/devtools/azion-edge-runtime/nextjs/nextjs.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/pt-br/pages/devtools/azion-edge-runtime/nextjs/nextjs.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/pt-br/pages/devtools/azion-edge-runtime/nextjs/nextjs.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/pt-br/pages/devtools/azion-edge-runtime/nextjs/nextjs.mdx
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,160 @@ | |||
| --- | |||
| title: Solução de Problemas de uma Aplicação OpenNext | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| title: Solução de Problemas de uma Aplicação OpenNext | |
| title: Solução de problemas de uma aplicação OpenNext |
| --- | ||
| title: Solução de Problemas de uma Aplicação OpenNext | ||
| description: >- | ||
| Aprenda como solucionar problemas de apps OpenNext na Azion: execute localmente com o Azion CLI, monitore logs, use APIs de Eventos em Tempo Real, Metadados e GraphQL, corrija limites de tamanho e variáveis de ambiente. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pq o nome do produto ta traduzido pra Eventos em Tempo Real?
| namespace: documentation_guides_opennext_troubleshooting | ||
| --- | ||
|
|
||
| ## 1. Desenvolvimento Local e Depuração com o Azion CLI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ## 1. Desenvolvimento Local e Depuração com o Azion CLI | |
| ## 1. Desenvolvimento local e depuração com o Azion CLI |
|
|
||
| ## 1. Desenvolvimento Local e Depuração com o Azion CLI | ||
|
|
||
| O primeiro e mais crucial passo de solução de problemas é realizado antes mesmo do deployment. O Azion CLI permite que você execute sua função em um ambiente local que simula a plataforma Azion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deployment?
| * **Feedback Imediato**: Veja os resultados das suas alterações de código instantaneamente. | ||
| * **Economia de Tempo**: Evita a necessidade de deployment para cada pequena alteração. | ||
| * **Ambiente Controlado**: Depure a lógica da sua aplicação sem afetar o ambiente de produção. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deployment?
| * **Feedback Imediato**: Veja os resultados das suas alterações de código instantaneamente. | |
| * **Economia de Tempo**: Evita a necessidade de deployment para cada pequena alteração. | |
| * **Ambiente Controlado**: Depure a lógica da sua aplicação sem afetar o ambiente de produção. | |
| * **Feedback imediato**: Veja os resultados das suas alterações de código instantaneamente. | |
| * **Economia de tempo**: Evita a necessidade de deployment para cada pequena alteração. | |
| * **Ambiente controlado**: Depure a lógica da sua aplicação sem afetar o ambiente de produção. |
| Função executada com sucesso! | ||
| ``` | ||
|
|
||
| ## 2. Monitoramento de Logs em Produção |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ## 2. Monitoramento de Logs em Produção | |
| ## 2. Monitoramento de logs em produção |
|
|
||
| ## 2. Monitoramento de Logs em Produção | ||
|
|
||
| Uma vez que sua aplicação está em produção, você precisa de ferramentas para observar seu comportamento em tempo real e analisar eventos passados. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Uma vez que sua aplicação está em produção, você precisa de ferramentas para observar seu comportamento em tempo real e analisar eventos passados. | |
| Quando sua aplicação estiver em produção, você precisará de ferramentas para observar seu comportamento em tempo real e analisar eventos passados. |
|
|
||
| Uma vez que sua aplicação está em produção, você precisa de ferramentas para observar seu comportamento em tempo real e analisar eventos passados. | ||
|
|
||
| ### Acesso em Tempo Real (Tailing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ### Acesso em Tempo Real (Tailing) | |
| ### Acesso em tempo real (Tailing) |
|
|
||
| Para monitorar logs à medida que acontecem, use o argumento `--tail` com o Azion CLI. Isso cria uma sessão contínua que exibe novos logs à medida que são gerados. | ||
|
|
||
| **Comando Chave**: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Comando Chave**: | |
| **Comando chave**: |
|
|
||
| Este comando é ideal para depurar problemas que estão acontecendo atualmente ou para monitorar o comportamento da aplicação durante um novo deployment. | ||
|
|
||
| ### Visualização via Console da Azion (Eventos em Tempo Real) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
traduzir: Eventos em Tempo Real
|
|
||
| Para uma análise mais visual com mais opções de filtro, o Console da Azion é a ferramenta ideal. | ||
|
|
||
| 1. Acesse o **Gerenciador em Tempo Real**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passos 1 e 2 estão em PT no Console conforme descrito aqui?
| 2. No menu, vá para **Observar > Eventos em Tempo Real**. | ||
| 3. Selecione a guia do Console **Functions**. | ||
|
|
||
| Nessa tela, você pode: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Nessa tela, você pode: | |
| Nessa tela, você pode: | |
| * Pesquisar mensagens de log específicas. | ||
| * Analisar informações detalhadas para cada evento, como `ID da Função` e `Timestamp`. | ||
|
|
||
| ## 3. Análise Avançada com a API de Metadados |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ## 3. Análise Avançada com a API de Metadados | |
| ## 3. Análise avançada com a API de metadados |
|
|
||
| Frequentemente, o problema não está apenas no código, mas no contexto da solicitação (origem, cabeçalhos, etc.). A **API de Metadados** da Azion permite que suas funções acessem esses dados. Você pode registrar esses metadados para entender melhor o comportamento da sua aplicação. | ||
|
|
||
| **Exemplo Prático**: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Exemplo Prático**: | |
| **Exemplo prático**: |
| } | ||
| ``` | ||
|
|
||
| Ao implantar este código e monitorar os logs com `azion logs cells --tail`, você verá mensagens como: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Ao implantar este código e monitorar os logs com `azion logs cells --tail`, você verá mensagens como: | |
| Ao implementar este código e monitorar os logs com `azion logs cells --tail`, você verá mensagens como: |
|
|
||
| Isso permite que você depure lógica de roteamento, segurança (e.g., bloqueio por região) e personalização de conteúdo. | ||
|
|
||
| ## 4. Coleta Estruturada de Logs com a API GraphQL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ## 4. Coleta Estruturada de Logs com a API GraphQL | |
| ## 4. Coleta estruturada de logs com a API GraphQL |
Co-authored-by: MarianaReisAlcantara <mariana.alcantara@azion.com>
| Para automação, integração com sistemas de monitoramento externos (como Datadog ou New Relic), ou para realizar análises complexas, a Azion fornece uma **API GraphQL**. | ||
|
|
||
| Com ela, você pode executar consultas para buscar logs em um formato estruturado. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Ferramenta chave**: O **GraphQL Playground**, disponível no Console da Azion, permite que você construa e teste suas consultas antes de integrá-las aos seus sistemas. |
| Com ela, você pode executar consultas para buscar logs em um formato estruturado. | ||
|
|
||
| **Ferramenta Chave**: O **GraphQL Playground**, disponível no Console da Azion, permite que você construa e teste suas consultas antes de integrá-las aos seus sistemas. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Exemplo de consulta**: |
|
|
||
| **Ferramenta Chave**: O **GraphQL Playground**, disponível no Console da Azion, permite que você construa e teste suas consultas antes de integrá-las aos seus sistemas. | ||
|
|
||
| **Exemplo de Consulta**: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Exemplo de Consulta**: | |
| Esta consulta obtém os 10 eventos de Console mais recentes contendo uma linha de log específica. |
|
|
||
| 1. **Analise seu pacote**: Use ferramentas como [Webpack Bundle Analyzer](https://www.npmjs.com/package/webpack-bundle-analyzer) ou [ESBuild Analyzer](https://esbuild.github.io/analyze/) para identificar dependências grandes. | ||
| 2. **Remova dependências não usadas**: Audite seu `package.json` e código para pacotes desnecessários. | ||
| 3. **Otimize importações**: Prefira importar funções específicas em vez de bibliotecas inteiras (por exemplo, `import { parse } from "date-fns"` em vez de `import * as dateFns from "date-fns"`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 3. **Otimize importações**: Prefira importar funções específicas em vez de bibliotecas inteiras (por exemplo, `import { parse } from "date-fns"` em vez de `import * as dateFns from "date-fns"`). | |
| 4. **Aproveite o cache da Azion**: Mova ativos estáticos e arquivos grandes para o Object Storage ou CDN da Azion e faça referência a eles via URLs em vez de empacotá-los. |
| Consulte [a documentação da Azion sobre limites de função](/pt-br/documentacao/produtos/build/edge-application/edge-functions/#limites) para restrições de tamanho atualizadas. | ||
|
|
||
| --- | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ## 6. Minhas variáveis de ambiente não estão disponíveis na Function |
| A Azion permite que você defina variáveis de ambiente para suas funções, mas elas devem ser configuradas explicitamente no console da Azion ou via API. | ||
|
|
||
| Se seu código não consegue acessar uma variável de ambiente esperada: | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Os passos no console estao em PT? senao traduzir
| 1. **Verifique o Console da Azion**: Vá para sua Aplicação > Funções > Variáveis de Ambiente e assegure-se de que a variável esteja definida. |
…t.mdx Co-authored-by: MarianaReisAlcantara <mariana.alcantara@azion.com>
b6a3b59
|
|
||
| All minor and patch versions of Next.js 15 and the latest minor of Next.js 14 are supported. | ||
|
|
||
| To help improve compatibility, we encourage you to [report bugs](https://github.com/aziontech/opennextjs-azion/issues) and contribute code! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| To help improve compatibility, we encourage you to [report bugs](https://github.com/aziontech/opennextjs-azion/issues) and contribute code! | |
| To help improve compatibility, we encourage you to [report bugs](https://github.com/aziontech/opennextjs-azion/issues) and contribute with code! |
|
|
||
| :::note | ||
| Azion Functions have a maximum size limit of 50 MB per function. After building your project, pay attention to the compressed (gzipped) size of your deployment package—only the compressed size counts toward this limit. | ||
| For more details, see the [documentation on Function size limits](/en/documentation/products/build/edge-application/edge-functions/#limits). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| For more details, see the [documentation on Function size limits](/en/documentation/products/build/edge-application/edge-functions/#limits). | |
| For more details, see the [documentation on Functions size limits](/en/documentation/products/build/edge-application/edge-functions/#limits). |
|
|
||
| Properties: | ||
|
|
||
| | Property | Type | Description | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esses ? estão corretos aqui?
| "exclude": ["node_modules", "open-next.config.ts"] | ||
| ``` | ||
|
|
||
| Veja [Problemas Conhecidos](/pt-br/documentacao/runtime-api/frameworks-suportados/nextjs/#problemas-conhecidos) para mais detalhes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Veja [Problemas Conhecidos](/pt-br/documentacao/runtime-api/frameworks-suportados/nextjs/#problemas-conhecidos) para mais detalhes. | |
| Veja [Problemas conhecidos](/pt-br/documentacao/runtime-api/frameworks-suportados/nextjs/#problemas-conhecidos) para mais detalhes. |
|
|
||
| 5. Configure cache e armazenamento: | ||
|
|
||
| Veja o [Guia de Cache](/azion/caching) para saber como configurar o Azion Object Storage e Cache para ISR/SSG. Exemplo de configuração Azion: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O link tá certo?
|
|
||
| Este comando é ideal para depurar problemas que estão acontecendo atualmente ou para monitorar o comportamento da aplicação durante um novo deployment. | ||
|
|
||
| ### Visualização via Console da Azion (Eventos em Tempo Real) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui não seria Real-Time Events?
| Para uma análise mais visual com mais opções de filtro, o Console da Azion é a ferramenta ideal. | ||
|
|
||
| 1. Acesse o **Gerenciador em Tempo Real**. | ||
| 2. No menu, vá para **Observar > Eventos em Tempo Real**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mesma coisa aqui
|
|
||
| Para uma análise mais visual com mais opções de filtro, o Console da Azion é a ferramenta ideal. | ||
|
|
||
| 1. Acesse o **Gerenciador em Tempo Real**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui traduz?
|
|
||
| --- | ||
|
|
||
| ## 6. Minhas variáveis de ambiente não estão disponíveis na Função |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ## 6. Minhas variáveis de ambiente não estão disponíveis na Função | |
| ## 6. Minhas variáveis de ambiente não estão disponíveis na Function |
|
|
||
| Se seu código não consegue acessar uma variável de ambiente esperada: | ||
|
|
||
| 1. **Verifique o console da Azion**: Vá para sua Aplicação > Funções > Variáveis de Ambiente e assegure-se de que a variável esteja definida. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui traduz o Console?
Related issue:
Changes
Additional links