cancel
Showing results for 
Search instead for 
Did you mean: 

How to get all logs or list of all events triggered to my Kyma Function?

DhruvinM
Participant
0 Kudos

Hi Team,

We are trying to debug/check all the functions being called now we know we have the logs available on function/pods but we are not seeing any Logs there but from C4C I can see the call was made successfull.

But i am not able to see which function is being triggered, in Kyma console do we have any place where we can see all recieved messages/events/ etc?

BR

Dhruvin

Accepted Solutions (0)

Answers (3)

Answers (3)

Kwiatekus
Employee
Employee
0 Kudos

Hi,


Your function needs to produce logs. 
Serverless server wrapper for you function code does not produce logs on its own whenever function is called.

The easiest would be to include logs in your function code, i.e 
```
console.log("Function triggered with payload", event.data)
```
Then, after function is redeployed, it will produce logs which you can inspect via kubectl
```
kubectl logs -l serverless.kyma-project.io/function-name=my-function
```

Best Regards
Krzysztof

KorbinianStoe
Advisor
Advisor
0 Kudos

Hi @DhruvinM ,

in the eventing-CR you could change the Log-Level to Debug. That will print much more information about whats going on in the eventing system.

To check for incoming events you would then have to check the logs of the eventing-publisher-proxy deployment.

Remember to disable this feature asap, as it generates many more logs than you would probably need.

the configuration is mentioned here. The configuration field in question is logging.logLevel.
Set its value to

```
logging:
      logLevel:  "debug"
```

 

Cheers,
  Korbinian

DhruvinM
Participant
0 Kudos

Hi Korbinian,

Sorry to come back to you late, but i think we have some issues with workload errors with image pull secrets missing. 

DhruvinM_0-1714466048882.png

Can you please help me how can i fix this?

BR

Dhruvin

 

 

 

Kwiatekus
Employee
Employee
0 Kudos
With https://github.com/kyma-project/serverless/releases/tag/1.4.3 we have patched the problematic configuration of secrets.
Kwiatekus
Employee
Employee
0 Kudos
With https://github.com/kyma-project/serverless/releases/tag/1.4.3 we have patched the problematic configuration of secrets.
Kwiatekus
Employee
Employee
0 Kudos

With https://github.com/kyma-project/serverless/releases/tag/1.4.3 we have patched the problematic configuration of secrets, unfortunately the warning event will stop be emitted by kubernetes after function pod restart. You can restart all the function pods in a given namespace by running

kubectl rollout restart deployment -l serverless.kyma-project.io/managed-by=function-controller -n {namespace}

a-thaler
Advisor
Advisor
0 Kudos

Hi @DhruvinM ,

you could start collecting trace data of your function calls and then introspect the traffic. The event gets dispatched to the Eventing module via the istio ingressgateway. The Eventing module then dispatches it to your function. These end-2-end request chains are trackable via traces.

Have a look at the SAP Cloud Logging integration guide to set up a Cloud Logging instance and integrate it with a Kyma runtime for trace collection.

Hope that helps,

Andreas

DhruvinM
Participant
0 Kudos
Hi A-thaler, Sorry to come back to you late, but i think we have some issues with workload errors with image pull secrets missing. DhruvinM_0-1714466048882.png Can you please help me how can i fix this? BR Dhruvin