metrics.service.ts 527B

12345678910111213141516171819
  1. import { Injectable } from '@angular/core';
  2. import { HttpClient } from '@angular/common/http';
  3. import { Observable } from 'rxjs';
  4. import { SERVER_API_URL } from 'app/app.constants';
  5. @Injectable({ providedIn: 'root' })
  6. export class JhiMetricsService {
  7. constructor(private http: HttpClient) {}
  8. getMetrics(): Observable<any> {
  9. return this.http.get(SERVER_API_URL + 'management/metrics');
  10. }
  11. threadDump(): Observable<any> {
  12. return this.http.get(SERVER_API_URL + 'management/threaddump');
  13. }
  14. }