Service metrics like Response Time and failure rate are gathered from the OneAgent when it instruments an application process.
For example if you had a Java application running with the Dynatrace OneAgent Instrumented, Dynatrace would gather data from the sensors placed within the application code. These sensors are pre configured by the Dynatrace development team and return the response time when methods are called.
Failure rate is gathered by the agent detecting application exceptions, http error codes and application error pages.
These response times and failures for individual transactions are used to create the "service" metrics you are listing.
Hope this helps answer your question.