When endpointConfiguration.SendOnly(); is in my code it generates
System.Exception: Metrics are not supported on send only endpoints.
The exception is raised during Endpoint.Create and causes the endpoint to be null, stopping my application from functioning. Is there a way to suppress this exception or exclude the SendOnly endpoint from Heartbeat monitoring so that the receiving endpoint’s Heartbeat can still be monitored without the SendOnly endpoint raising exceptions? Thank you.
Thanks David. I was following the instructions in the Connect to ServicePlatform with JSON configuration, which is a global configuration that affected all endpoints. Pulling the JSON Heartbeats code and configuring the endpoints separately as you recommended is definitely the way to resolve this issue.
You could also keep the JSON configuration, parse it, and then if the endpoint is meant to be send-only, set the platformConnection.Heartbeats.Enabled = false before calling endpointConfiguration.ConnectToServicePlatform(platformConnection).