Skip to content

Commit

Permalink
AI Techwriter documentation update - 2024-11-28 (#1383)
Browse files Browse the repository at this point in the history
* AI Comment: Added a section on utilizing Azion Edge Storage for delivering MP4 videos in HLS format to address the user's request. Included placeholders for further details to be added by a technical writer. Maintained the original structure and format of the documentation.
Código: 18496

* AI Comment: Added a new section 'Testing Rules in Staging Environment' with steps to test custom allowed rules in a staging environment before deploying them to production. This addresses the suggestion to include details about testing rules in a staging environment.
Código: 18599

* AI Comment: Added an example of performing a NOT LIKE query using the `Ne` operator in combination with the `Like` operator, as suggested. This addresses the question of how to perform a NOT LIKE query in GraphQL.
Código: 18587

* Apply suggestions from code review

* Update queries.mdx

* Apply suggestions from code review

* Apply suggestions from code review

* Update custom-allowed-rule.mdx

* Update queries-gql.mdx PT

* Update src/content/docs/en/pages/guides/edge-application/ea-enforce-hls.mdx

* Update src/content/docs/en/pages/devtools/api-graphql/queries/queries.mdx

* Update ea-enforce-hls.mdx PT

* Apply suggestions from code review

Co-authored-by: Guilherme Afonso Oliveira  <guilherme.oliveira@azion.com>

---------

Co-authored-by: Mariana Bellorín Aguilera <89138244+MarianaAguilera@users.noreply.github.com>
Co-authored-by: Guilherme Afonso Oliveira <guilherme.oliveira@azion.com>
  • Loading branch information
3 people authored Dec 23, 2024
1 parent 0822f49 commit 00506e4
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 22 deletions.
25 changes: 22 additions & 3 deletions src/content/docs/en/pages/devtools/api-graphql/queries/queries.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,27 @@ To query raw data, it's *mandatory* to inform:
- A time range interval for all datasets, using either **tsRange** or **tsGt** + **tsLt**.
- Which consulted data should be exhibited. On the presented example, the **ts**, **remoteAddress**, **requestUri**, and **stacktrace** fields were used.

For example, to perform a **NOT LIKE** query, you can use the `Ne` operator combined with the `Like` or `Ilike` operators to filter out entries that match a certain pattern. Here's an example:

```graphql
query HttpQuery {
httpEvents(
limit: 10,
filter: {
tsRange: {begin:"2023-02-14T10:10:10", end:"2023-02-15T10:10:10"},
requestUriNe: "%/verify%"
}
orderBy: [ts_ASC]
)
{
ts
remoteAddress
requestUri
stacktrace
}
}
```

:::tip
You can also use the **Top X query** feature with the Real-Time Events GraphQL API. It helps to visualize how resources and tools are being used and provide a more detailed analysis of certain conditions that are either more or less commonly used. For example, you can query for “Top 10 Hosts” or “Top 10 Status Codes”.

Expand Down Expand Up @@ -380,9 +401,7 @@ Depending on the [type of field of a dataset](/en/documentation/devtools/graphql
| String | `Eq`, `Ne`, `Like`, `Ilike`, `In`, `NotIn`, `IsNull` |
| Integer, Float, DateTime | `Eq`, `Lt`, `Lte`, `Gt`, `Gte`, `Ne`, `In`, `NotIn`, `IsNull`, `Range` |


Discover the essential role of operators in GraphQL queries. Watch the video below:
<div class="cms-embed">
<iframe width="600" height="400" src="https://www.youtube.com/embed/OGam-xrzuBA?si=cg-SIvWH8OedkrtY" loading="lazy" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<iframe width="600" height="400" src="https://www.youtube.com/embed/OGam-xrzuBA?si=cg-SIvWH8OedkrtY" loading="lazy" title="Operators in GraphQL for Real Time Event Queries" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import InterfaceNote from '~/includes/snippets/InterfaceNote/en/snippet.mdx'

<InterfaceNote />

Azion Edge Platform allows you to [deliver live streaming content in HLS format](https://www.azion.com/en/solutions/live-streaming-delivery/), being able to easily self-provision and configure your cache policies. This guide covers the step-by-step to enforce HLS cache, managing chunks and playlists caching, and setting up rules engines rules.
Azion Edge Platform allows you to [deliver live streaming content in HLS format](https://www.azion.com/en/solutions/live-streaming-delivery/), being able to easily self-provision and configure your cache policies. This guide covers the step-by-step to enforce HLS cache, manage chunks and playlists caching, set up rules engines rules, and utilize Azion Edge Storage for optimal video delivery.

---

Expand All @@ -23,6 +23,7 @@ Azion Edge Platform allows you to [deliver live streaming content in HLS format]
- An existing Azion edge application, or [create a new one](/en/documentation/products/guides/build/build-an-application/).
- [A domain associated with the edge application](/en/documentation/products/guides/configure-a-domain/).
- [Tiered Cache enabled](/en/documentation/products/guides/billing-and-subscriptions/) in your account.
- Access to [Azion Edge Storage](/en/documentation/products/store/edge-storage/) for storing video content.

---

Expand All @@ -34,7 +35,7 @@ In this example, an edge application and a domain linked to it has been previous

### Creating a cache policy for the chunks

First, you must to create a cache policy for the chunks:
First, you must create a cache policy for the chunks:

<Tabs client:visible>
<Fragment slot="tab.cli">CLI </Fragment>
Expand All @@ -47,7 +48,7 @@ First, you must to create a cache policy for the chunks:
3. Enable Tiered Cache for your application: `$ azion update edge-application --application-id 1234 --l2-caching true`
4. Create an origin: `$ azion create origin --application-id 1234 --name "origin-edge" --origin-type single_origin --addresses "example.com" --host-header "example.com"`
5. Configure the cache policy for the chunks: `$ azion create cache-setting --application-id 1234 --name "chunks-policy" --browser-cache-settings "override" --browser-cache-settings-maximum-ttl 0 --cdn-cache-settings "override" --cnd-cache-settings-maximum-ttl 60`
- Define **Advanced Cache Key** behavoirs according to your needs. Check the optional flags for the [create command](/en/documentation/devtools/cli/create/#optional-flags-3).
- Define **Advanced Cache Key** behaviors according to your needs. Check the optional flags for the [create command](/en/documentation/devtools/cli/create/#optional-flags-3).
- The recommendation is selecting **Content does not vary**, for **Query String** and/or **Cookies**, according to your needs.
</Fragment>

Expand Down Expand Up @@ -92,7 +93,7 @@ First, you must to create a cache policy for the chunks:

<Fragment slot="panel.cli">
Now configure the cache policy for the playlist: `$ azion create cache-setting --application-id 1234 --name "playlist-policy" --browser-cache-settings "override" --browser-cache-settings-maximum-ttl 0 --cdn-cache-settings "override" --cnd-cache-settings-maximum-ttl 5`
- Define **Advanced Cache Key** behavoirs according to your needs. Check the optional flags for the [create command](/en/documentation/devtools/cli/create/#optional-flags-3).
- Define **Advanced Cache Key** behaviors according to your needs. Check the optional flags for the [create command](/en/documentation/devtools/cli/create/#optional-flags-3).
- The recommendation is selecting **Content does not vary**, for **Query String** and/or **Cookies**, according to your needs.
</Fragment>

Expand Down Expand Up @@ -126,6 +127,14 @@ Still on the **Cache Settings** tab:
Read more about setting up [cache settings](/en/documentation/products/build/edge-application/cache-settings/) for your edge applications.
:::

### Utilizing Azion Edge Storage for HLS video delivery

To deliver MP4 videos using HLS and Azion Edge Storage:

1. Upload your MP4 video files to Azion Edge Storage.
2. Configure your encoder to convert MP4 files to HLS format and point to Azion Edge Storage as the origin.
3. Follow the cache policy setup steps outlined above to ensure efficient video delivery.

### Creating Rules Engine rules

<Tabs client:visible>
Expand Down Expand Up @@ -238,5 +247,3 @@ Go to the [Rules Engine for Edge Application](/en/documentation/products/build/e
:::

<LinkButton link="/en/documentation/architectures/live-streaming-delivery/live-streaming-delivery-with-hls/" label="Go to Live Streaming Delivery architecture" severity="secondary" />


Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,4 @@ See the list of all available internal rules below:
| 1402 | Possible trick to evade protection: encoded chars `%20-%3F` found in Body, Path, Query String or Cookies. |
| 1500 | Possible File Upload attempt: `asp/php` or `.ph`, `.asp`, `.ht` found in filename in a multipart POST containing a file. |

<iframe width="560" height="315" src="https://www.youtube.com/embed/uhpoeBXLvxk?si=eb8Jx_LRaUq1FBlh" loading="lazy" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>



<iframe width="560" height="315" src="https://www.youtube.com/embed/uhpoeBXLvxk?si=eb8Jx_LRaUq1FBlh" loading="lazy" title="Custom allowed rules Web Application Firewall" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,27 @@ Para consultar dados brutos, é *obrigatório* informar:
- Um intervalo de tempo para todos os conjuntos de dados, utilizando **tsRange** ou **tsGt** + **tsLt**.
- Quais dados consultados devem ser exibidos. No exemplo apresentado, os campos **ts**, **remoteAddress**, **requestUri** e **stacktrace** foram usados.

Por exemplo, para realizar uma consulta **NOT LIKE**, você pode usar o operador `Ne` combinado com os operadores `Like` ou `Ilike` para filtrar entradas que correspondem a um determinado padrão. Aqui está um exemplo:

```graphql
query HttpQuery {
httpEvents(
limit: 10,
filter: {
tsRange: {begin:"2023-02-14T10:10:10", end:"2023-02-15T10:10:10"},
requestUriNe: "%/verify%"
}
orderBy: [ts_ASC]
)
{
ts
remoteAddress
requestUri
stacktrace
}
}
```

:::tip[dica]
Você também pode utilizar o recurso **Top X query** com a API GraphQL do Real-Time Events. Ela tem a finalidade de visualizar o uso de recursos e ferramentas e ter uma visão detalhada sobre determinadas condições que são mais ou menos usadas. Por exemplo, você pode consultar os “Top 10 Hosts” ou os “Top 10 Status Codes”.

Expand Down Expand Up @@ -378,8 +399,3 @@ Dependendo do [tipo de campo de um conjunto de dados](/pt-br/documentacao/devtoo
| ------------- | -------------------- |
| String | `Eq`, `Ne`, `Like`, `Ilike`, `In`, `NotIn`, `IsNull` |
| Integer, Float, DateTime | `Eq`, `Lt`, `Lte`, `Gt`, `Gte`, `Ne`, `In`, `NotIn`, `IsNull`, `Range` |



---

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import InterfaceNote from '~/includes/snippets/InterfaceNote/pt/snippet.mdx'

<InterfaceNote />

A Plataforma de Edge da Azion permite que você [entregue conteúdo de streaming ao vivo no formato HLS](https://www.azion.com/pt-br/solucoes/live-streaming/), capacitando-lhe a autoprovisionar e configurar suas política de cache facilmente. Este guia abrange o passo a passo para implementar o cache HLS, gerenciando o cache de chunks e playlists e configurando regras no Rules Engine.
A Plataforma de Edge da Azion permite que você [entregue conteúdo de streaming ao vivo no formato HLS](https://www.azion.com/pt-br/solucoes/live-streaming/), capacitando-lhe a autoprovisionar e configurar suas política de cache facilmente. Este guia abrange o passo a passo para implementar o cache HLS, gerenciar o cache de chunks e playlists, configurar regras no Rules Engine e utilizar o Edge Storage para uma entrega de vídeo otimizada.

---

Expand All @@ -23,6 +23,7 @@ A Plataforma de Edge da Azion permite que você [entregue conteúdo de streaming
- Uma edge application existente na Azion, ou [crie uma nova](/pt-br/documentacao/produtos/guias/build/criar-uma-aplicacao/).
- [Um domínio associado à edge application](/pt-br/documentacao/produtos/guias/configurar-dominio/).
- [Tiered Cache habilitado](/pt-br/documentacao/produtos/guias/billing-and-subscriptions/) em sua conta.
- Acesso ao [Edge Storage da Azion](/pt-br/documentacao/produtos/store/edge-storage/) para armazenar conteúdo de vídeo.

---

Expand Down Expand Up @@ -130,6 +131,14 @@ Ainda na aba **Cache Settings**:
Leia mais sobre a configuração de [cache settings](/pt-br/documentacao/produtos/build/edge-application/cache-settings/) para suas edge applications.
:::

### Utilize o Edge Storage da Azion para entrega de vídeos HLS

Para entregar vídeos MP4 usando HLS e o Edge Storage:

1. Faça o upload dos arquivos de vídeo MP4 para o Edge Storage.
2. Configure o seu codificador para converter os arquivos MP4 para o formato HLS e defina o Edge Storage como origem.
3. Siga as etapas de configuração da política de cache mencionadas acima para garantir uma entrega eficiente de vídeo.

### Crie regras no Rules Engine

<Tabs client:visible>
Expand Down Expand Up @@ -242,6 +251,3 @@ Acesse a documentação do [Rules Engine for Edge Application](/pt-br/documentac
:::

<LinkButton link="/pt-br/documentacao/arquiteturas/live-streaming-delivery/live-streaming-delivery-com-hls/" label="Consulte a arquitetura de Live Streaming Delivery" severity="secondary" />

---

0 comments on commit 00506e4

Please sign in to comment.