Skip to main content
Planned for development

Access to all Cognite Function calls, their logs, responses, and runtimes + filtering functionality

Related products:Functions
  • October 16, 2024
  • 3 replies
  • 41 views

Anders Brakestad
Seasoned

Here are some of the things I cannot do with the call logs

  • See all logs (only four pages)
  • Filter based on status
  • Filter based on schedule
  • Filter based on time ranges
  • Sort calls based on run times
  • Automatically locate the “first failed” call (which is often relevant in debugging)
  • See logs in monospaced font to preserve formatting (see other feature request)
  • Get call logs into Power BI (I need to deploy a separate Cognite Function that fetches call logs and writes to a Sequence, which can then be loaded into Power BI for simple monitoring)

At least we should be able to see all logs from our calls, with additional functionality to filter in relevant dimensions.

3 replies

Jørgen Lund
Seasoned Practitioner
Forum|alt.badge.img
  • Product Manager
  • November 6, 2024

Hi @Anders Brakestad , thanks for this feedback. 

To better understand the request, could you provide some more context on what you’re typically using the UI for and when? Is it mainly when somethign fails and you’re debugging? How long back in time do you typically need to look?

I assume “logs” refers to all information about the Function calls, not limited to the actual logs.

For the PowerBI part, we have a new connector that supports REST queries that might better support your use case. It’s currently in process to be published as an official PowerBI connector, but until then can be shared and set up as a custom connector. Would you be interested in testing this?


Anders Brakestad
Seasoned

Hi Jørgen!

I apologize for the late reply. Your questions escaped my radar. I will try to explain how I have used the UI.

Use Case

I am co-developing a Python backend that we deploy to scheduled Cognite Functions. Our current deployment calls these functions every 5 minutes. Ergo 120 calls per day. The UI gives me four pages of 25 calls each. So I get almost one day’s worth of function calls. If something fails over the weekend, or if something fails while I spend time on other projects and miss the failure, then I’m stuck with using the SDK to access the function call history and the call logs.

Function Calls

The list of function calls is useful. I often want to find the first call that failed, since sometimes a failed call leads to all subsequent calls failing as well. I would also like to filter the call list, for example to only the failed calls, or only the timeout calls.

Call Logs

The call log is where we can start the debugging. If we could also search the logs, and filter the call list to calls with logs that match the search, that would be super useful.

Our work-around

We have made a simple streamlit application that retrieves all our deployed functions and all their calls. We can here easily select a specific call and the app retrieves its logs on-the-fly. It also gives us an interactive plotly timeline plot of all calls, color coded by the call status. Kind of similar to what you have for Extraction Pipelines.

 

Hopefully this clarified a bit. Let me know if you want more information.

Anders


Everton Colling
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • April 30, 2025

Hi Anders,

Thanks for getting back to us and for the detailed explanation of how you use the Functions logs. Your description of the use case and the workaround you built is very helpful!

On the UI side, we have made some updates since your original post. As you might have seen, we added support for showing logs in a monospaced font to keep the formatting clear. Also, following up on the earlier discussion, the new Power BI connector is now available and supports REST queries, which should help with getting function data into Power BI more easily.

For the remaining items in your request, we are evaluating some improvements for filtering call logs in the UI that should address some of them. However, we don’t have a specific timeline for these enhancements yet.