Reputation: 13946
We are working on implementing a backend service that as part of our overall authentication product will be sending TOTPs via SMS and voice.
We are considering using Twilio to send the SMSs and make the voice calls.
We are a Dynatrace customer and have all sorts of dashboards for our existing services and we would like to be able to have unified dashboards that show the Twilio metrics rather than having to log into the Twilio console and view metrics there.
Is there any API to be able to export metrics out of Twilio so we can feed them to Dynatrace? Stuff like queue lengths, latencies, error rates, etc.
I want to be clear I'm not talking about call centers or anything like this (which it appears to be what Flex is about). This is a backend service that would programmatically use Twilio to send SMSs and robo voice calls to the phones of our customers to give them a TOTP they can use to complete a 2FA login.
Upvotes: 0
Views: 31
Reputation: 106
So, if you mean Voice and Messenger Insights data, then some Voice Insights data is available via the Voice Insights REST API; however, there doesn't appear to be an equivalent for Messaging Insights [1] at the time of writing.
Twilio does expose the underlying raw data, so you could build some metrics yourself. You can get data from the following sources:
The public REST APIs to fetch events, i.e., delivery statuses. All the OpenAPI specifications for Twilio's REST APIs can be found at https://github.com/twilio/twilio-oai.
Both SMS and Voice support sending status callback events to a public endpoint. See the Programmable Messaging documentation and Programmable Voice documentation
Via Event Streams [2]. This lets you stream supported events to a public endpoint (webhook) or Amazon Kinesis. The complete list of supported events can be found at https://www.twilio.com/docs/events/event-types-list
You might have to combine the above options to get all the necessary information, and it will require some custom code to send the data to Dynatrace, but I hope this helps.
Rob
[1] https://help.twilio.com/articles/360050545513
[2] https://www.twilio.com/docs/events
Upvotes: 0