---
lang: en
title: 'API docs: metrics.metricscomponent._constructor_'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/extensions/metrics
permalink: /doc/en/lb4/apidocs.metrics.metricscomponent._constructor_.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/metrics](./metrics.md) &gt; [MetricsComponent](./metrics.metricscomponent.md) &gt; [(constructor)](./metrics.metricscomponent._constructor_.md)

## MetricsComponent.(constructor)

Constructs a new instance of the `MetricsComponent` class

<b>Signature:</b>

```typescript
constructor(application: Application, metricsConfig?: MetricsConfig);
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  application | [Application](./core.application.md) |  |
|  metricsConfig | [MetricsConfig](./metrics.metricsconfig.md) |  |


