# Logging and Tracing

In Astera, users can troubleshoot runtime issues by monitoring live tracing for any APIs deployed on the server.

To configure logging, create a new server profile by right-clicking on the cluster node in the Server Explorer and selecting *Server Profiles* from the context menu.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/bRR159riXhJbOnEQR0Lv/01-Server-Profile-Option.PNG)

This will open a new window.

1. Create a new profile by selecting the *Add a new server profile* option.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/bbSWGj9lWEAiQgOubZ8d/02-New-Profile.PNG)

As you can see, we already have a server profile created.

2. Select the *Publishing Settings* tab and scroll down to the *API Runtime logging and tracing* section.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/HNFXLuqOTPupl7QIpVup/03-API-log-and-trace.png)

Here, the user can select the level of logs to be traced, including information, warnings, errors, or all-inclusive. The logging stages include,

*Request Validator Logs:* It includes pre-validating the request context before sending it through the runtime processor by validating the server availability, and deployment activity, and inspecting if the request has the supported formats.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/hUEokpSqeaHbSqj0RgzB/04-Request-Valdiator.PNG)

*Processor Logs*: Processor logs include runtime components of the request, including information about a cached request pipeline, the concurrent pipelines in execution, and runtime capacity.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/wu8sxU8tKNlq0sUY2DS1/05-Processor-Logs.PNG)

*Purge Event Logs After:* This counter shows the number of days after which the logs will be purged/removed since a lot of them can accumulate at runtime.

Once the server profile is configured and saved, the next step is to select this profile in the *Server Properties*.

After logging and tracing have been configured, users can now view the live runtime traces generated for all deployed APIs.

Next, go to the Server Browser and open the Deployed Endpoint View. To view the tracing for any deployed API, right-click and select *Show Runtime Trace* for any API deployment listed.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/BZts7XqOIq5pZDiObXjG/06-Show-Runtime-Trace.PNG)

You can now see the trace.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/49aH8KpVj7C5ENsVchNw/07-Trace-Window.PNG)

This concludes logging and tracing in Astera.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.astera.com/api-flow/api-publishing/manage/logging-and-tracing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
